I am developing and android app using react-native. Everything was normal until today
STEPS
npx react-native run-android
, the build is successful but the app crashes immediately.Maybe important notes :
0.61.5
> Task :app:installDebug
07:48:13 V/ddms: execute: running am get-config
07:48:14 V/ddms: execute 'am get-config' on 'GBT4C18C21006873' : EOF hit. Read: -1
07:48:14 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'JSN-L22 - 10' for app:debug
07:48:14 D/app-debug.apk: Uploading app-debug.apk onto device 'GBT4C18C21006873'
07:48:14 D/Device: Uploading file onto device 'GBT4C18C21006873'
07:48:14 D/ddms: Reading file permision of /PATH/TO/PROJECT/android/app/build/outputs/apk/debug/app-debug.apk as: rw-r--r--
07:48:15 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
07:48:18 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on 'GBT4C18C21006873' : EOF hit. Read: -1
07:48:18 V/ddms: execute: returning
07:48:18 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
07:48:18 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on 'GBT4C18C21006873' : EOF hit. Read: -1
07:48:18 V/ddms: execute: returning
Installed on 1 device.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
I fixed it !
Thanks to @Guy Incognito who commented my question.
The key is to use adb logcat
on a terminal and executing npx react-native run-android
in another terminal. You get a lot of logs from your phone but if you track the exact second in which the build occurred you can easily find the error message and fix it !
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