When I am trying to generate android apk by using ./gradlew installRelease
, I get this error in console:
~/React-Native/mockingbird/android/app/
react-native bundle
prior to ./gradlew assembleRelease
.For myself, I was running react-native bundle
prior to running ./gradlew assembleRelease
.
I was getting a similar duplicate error message with one of my assets.
Looking at the ./gradlew assembleRelease
output, I could tell that it builds the JS bundle by itself (thanks to apply from: "../node_modules/react-native/react.gradle"
in your build.gradle
file) so it was not necessary to manually run react-native bundle
before hand.
If I simply did not run react-native bundle
before running ./gradlew assembleRelease
everything worked great.
I tested the Release APK and the JS bundle loads fine, including all images.
My only concern is whether the source maps --sourcemap-output
(for Bugsnag) will be created. If not, I'm sure there's a way to have ./gradlew assembleRelease
generate those as well. I just have not tested it yet.