Reputation: 1670
I have a react native app created in VS App Center which crashes on launch (Android). The debug version works fine.
One interesting error in the logcat is this:
11-03 16:22:37.543 17977 18007 E AndroidRuntime: 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.
This error doesn't make sense since it shouldn't need Metro server since it is building the release variant in App Center.
I am using react native 0.60.6.
Full logcat here
Source code here
Upvotes: 0
Views: 754
Reputation: 1670
For some reason it was the tools version of gradle. I had it set to version 4. If I lower it it doesn't crash:
android/build.gradle
dependencies {
classpath("com.android.tools.build:gradle:3.4.1")
Upvotes: 1