Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

react-native run-android command stuck on task app:installdebug

Tags:

Trying to install application to device using command react-native run-android.

No errors are shown, but app gets stuck onTask app:installDebug producing follwing output.

Task :app:installDebug 08:46:24 V/ddms: execute: running am get-config 08:46:24 V/ddms: execute 'am get-config' on ‘xxxxxxxxxx’ : EOF hit. Read: -1 08:46:24 V/ddms: execute: returning Installing APK 'app-debug.apk' on 'WAS-LX1 - 8.0.0' for app:debug 08:46:24 D/app-debug.apk: Uploading app-debug.apk onto device ‘xxxxxxxx’ 08:46:24 D/Device: Uploading file onto device ‘xxxxxxxxxxxx’ 08:46:24 D/ddms: Reading file permision of /Users/xxxxx/work/xxxx-app/android/app/build/outputs/apk/debug/app-debug.apk as: rw-r--r-- 08:46:25 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk" <============-> 99% EXECUTING [1m 20s] :app:installDebug

After about three 3 minutes follwing error is thrown:

Execution failed for task ':app:installDebug'. com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException

Tried ./gradlew clean, reinstalling node_modules. Adb device command shows device name.

like image 787
m2rt Avatar asked May 16 '19 18:05

m2rt


1 Answers

Here is what worked for me, for the same error message, on Oreo:

  1. Unplug the USB cable of the Android device
  2. Plug it in again (same USB port)
  3. Run Gradle again
  4. That time it worked
like image 105
Nicolas Raoul Avatar answered Oct 19 '22 07:10

Nicolas Raoul