Ajay Sivan
Ajay Sivan

Reputation: 2989

React Native Android staging build crashes on startup

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: enter image description here

All the builds work without any issue on iOS

Upvotes: 4

Views: 403

Answers (1)

Ajay Sivan
Ajay Sivan

Reputation: 2989

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.

Upvotes: 5

Related Questions