-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
after upgrade 0.67.3 -> 0.70.4 build release apk was success but miss index.android.bundle when start app with Flavors #34606
Comments
The same question for me. The current temporary solution is to manually generate the bundle file. Hope there is a better solution! step 1:
step 2:
|
Hello, Other details: With lower gradle versions, I get an error on development release build. When googling it, the solution suggested was to upgrade gradle to 7.0.+. I found this Github PR #30177 from October 2020, but I can still reproduce it. It is very frustrating and it blocks us from testing the Android build. |
thanks, but it doesn't work for me |
Eventually, yesterday I upgraded from 0.67.3 to 0.70.0 and the Android release builds work now. I left Hermes enabled on Android only; on iOS I had some issues with Hermes enabled on my M1 Mac so I disabled it for iOS. |
The issue here is caused by using different flavors. Can you try on 0.70 and report back if the issue persists? If so, we can look into it and potentially fix it. I don't think it's a bug but most likely a misconfig of your:
|
I have the same issue (and I'm also using flavors). It still does not work on 0.70.0 or 0.70.1. |
Thank you for your reply, but this config can work on 0.67.3 |
Is this happening on a blank project? |
It still does not work on 0.70.4 |
Just a heads up that I fixed this and it's going to be released in RN 0.71 |
Hey! Could you please tell us when this version is going to be released? I can't find pull request related to this issue. Thank you |
As soon as we're ready :) |
I would highly advice against doing this kind of fixes as 1. It will most likely won't work 2. If you forget you added this script in your package.json, your upgrade in the future will be really painful. |
Same issue with 0.70.6 =/ |
We were using Maybe not the issue here, but this thread helped lead me to the problem. |
Just a heads up that we fixed this in 0.71. I've also wrote a short guide on how to properly configure flavors so that the issue you're having is going away: I'm closing this as the root cause was fixed. |
I can confirm this works for me "expo": "^46.0.0", 'com.android.tools.build:gradle:7.2.2' |
New Version
0.70.4
Old Version
0.67.3
Build Target(s)
android real machine in release flavor
Output of
react-native info
System:
OS: macOS 10.15.4
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Memory: 527.52 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 16.14.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 8.3.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /Users/zaffy/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
Android NDK: 21.0.6113669
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7486908
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
Languages:
Java: 11.0.15.1 - /Library/Java/JavaVirtualMachines/jdk-11.0.15.1.jdk/Contents/Home//bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.0.0 => 18.1.0
react-native: 0.70.4 => 0.70.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Issue and Reproduction Steps
I follow the steps on this page https://react-native-community.github.io/upgrade-helper/?from=0.67.3&to=0.70.4, assemble flavor release apk success, but crash when start app, logcat print
Unable to load script. Make sure you're either running Metro (run 'npx react-native start') or that your bundle 'index.android.bundle
but log tell me copy bundle success:
The following are important file contents:
app/build.gradle
android/build.gradle
gradle.properties
gradle-wrapper.properties
package.json
The text was updated successfully, but these errors were encountered: