I make a small application on React native for Android. The application works in the emulator without errors. When you run the application on a real device, the application works only while the device is connected via USB. If you disconnect the phone from USB and restart the announcement, then the phone displays the error Unfortunately, MyAppName has stopped
. How can you find out what's going on? I suspect there may be something wrong in the gradle
settings, but how to track what is wrong? Since the phone is already disconnected from the USB and the application is restarted.
Asked
Active
Viewed 265 times
0

Nevada
- 277
- 1
- 7
- 13
-
Hi Nevada follow this thread to generate an apk and check if that works http://stackoverflow.com/questions/35283959/build-and-install-unsigned-apk-on-device-without-the-development-server. – Rishabh Bhatia May 11 '17 at 17:31
-
In your android\app\build.gradle try setting `def enableProguardInReleaseBuilds = false` if it is set to true, just above the android{} block – kwishnu May 11 '17 at 17:44
-
It set to false – Nevada May 11 '17 at 17:47
-
Hmm...I think I would make a new blank RN app, verify that it doesn't crash when not connected to your server, then add your code piece by piece until you find the culprit. Might be something is "undefined" – kwishnu May 11 '17 at 17:55