m2rt
m2rt

Reputation: 157

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

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.

Upvotes: 5

Views: 3514

Answers (3)

RaNa AbDuL QaDiR
RaNa AbDuL QaDiR

Reputation: 3

I just resolved this by wiping emulator data and open the android folder in Android Studio then run npx react-native run-android

Upvotes: 0

Nicolas Raoul
Nicolas Raoul

Reputation: 60203

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

Upvotes: 5

m2rt
m2rt

Reputation: 157

Tried every solution I found, but nothing worked. Finally did system settings reset and the problem went away

Upvotes: 0

Related Questions