I have added 2 more buildTypes in my build.gradle file staging
& prestaging
alongside with release
. When I build and run the release
buildType it works fine on the real device, but when I build and run staging
or prestaging
builds both crashes on startup. The crash report on the device shows the following error:
All the builds work without any issue on iOS
My staging
and prestaging
build failed because the bundle were not packaged correctly as the error says. This is because when building Android app react-native only add the bundle to the package if the buildType
name contains the word release
. The simple solution for this is to name the buildType's in such a way that the names contain the word release. I renamed the buildType's to stagingRelease
and prestagingRelease
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With