React Native app keeps closing on android emulator

If you have recently changed anything inside your gradle configurations or androidmanifest.xml such as package name etc.. then you must clean gradle files:

To solve this problem:

cd android
./gradlew clean

This should delete your old build directory and generate a new one


It turns out that if you are upgrading React Native, be wary that the upgrade process does not necessarily update all the required files (at the time of writing, upgrading to RN 0.32.0). It turns out this is a known issue (https://github.com/facebook/react-native/issues/8215). Until that's resolved, you'll need to manually update the AndroidManifest.xml file located at ./android/app/src/main/AndroidManifest.xml. I would recommend creating a sample react native project, and using the newly created AndroidManifest.xml from there to manually update the one in your existing project. Also, whenever you upgrade, do a diff between a newly created RN project and your own to verify that no other files need to be updated.