-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
[Android] App crash on release build with gradle:3.4.0 / gradle-wrapper:5.1.1 (debug is working) #24861
Comments
Hello there 👋 I think that the core of the issue lays here
I am pretty sure that react native can't use Gradle 5 for now - have you seen somewhere in the changelog mentioning that is supported (I may be wrong)? Do you have any precise reasons for needing to use Gradle 5? |
Also, it seems that it's probably the same issue described here: #24854 so it seems to be related also to 3.4.0? I'm closing this in favour of that other issue, but I'll ping internally if we are aware of these incompatibilities |
It's the latest available version and Android Studio ask me to update my project so I tried ;-) But indeed I haven't seen that we can use this version of Gradle yet. Thanks for the reply |
Seen same issue with RN 0.59.2. Android Studio upgraded gradle to version 5:
to
Reverting these changes fixed the issue for me! Thanks for the help! |
We cannot use gradle 5 yet facebook/react-native#24861
We cannot use gradle 5 yet facebook/react-native#24861
We cannot use gradle 5 yet facebook/react-native#24861
Hi,
I have an issue when launching an Android app with a release build (or a non-debug build) when using gradle:3.4.0 plugin and gradle-5.1.1 wrapper
The app crash directly after launch and I can see the following error in the logcat tab of Android Studio :
2019-05-15 11:16:39.412 31945-31961/? E/AndroidRuntime: FATAL EXCEPTION: create_react_context Process: com.testproject, PID: 31945 java.lang.RuntimeException: Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release. at com.facebook.react.bridge.CatalystInstanceImpl.jniLoadScriptFromAssets(Native Method) at com.facebook.react.bridge.CatalystInstanceImpl.loadScriptFromAssets(CatalystInstanceImpl.java:218) at com.facebook.react.bridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:31) at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:247) at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1152) at com.facebook.react.ReactInstanceManager.access$900(ReactInstanceManager.java:123) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:943) at java.lang.Thread.run(Thread.java:764)
The issue only happen with this version of Gradle plugin/wrapper and in release build.
If you do a debug build with the metro bundler started on your computer, it's working fine.
With the previous version (gradle plugin 3.1.1, gradle wrapper 4.10.2) it's working fine (debug and release).
I tested with
implementation "com.facebook.react:react-native:+"
and
implementation ("com.facebook.react:react-native:0.59.8"){force=true}
and it doesn't change anything
The issue happens on emulator and real devices.
React Native version: 0.59.8 (but also with previous version (tested with 0.58.6))
Gradle plugin version: 3.4.0
Gradle wrapper version: 5.1.1
Steps To Reproduce
If you need something else or more tests, just let me know
Thanks in advance for your support
The text was updated successfully, but these errors were encountered: