5
votes

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.

3
Have you tried uninstalling the app using adb uninstall com.your-org.your-packagename? Sometimes there's a version mismatch between what you're trying to install and what is installed already. - Marcel Kalveram
I did not do that. My solution was to reset factory settings. If the problem appears again, I will try that. :) - m2rt

3 Answers

4
votes

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
0
votes

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

0
votes

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