Description
[muralive@AwesomeProject ]$ react-native run-android
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72300Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42300Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee061Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore061Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco061Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline061Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp061Library UP-TO-DATE
:app:prepareComFacebookReactReactNative0110Library UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:preDexDebug UP-TO-DATE
:app:dexDebug UP-TO-DATE
:app:validateDebugSigning
:app:packageDebug UP-TO-DATE
:app:zipalignDebug UP-TO-DATE
:app:assembleDebug UP-TO-DATE
:app:installDebug FAILED
FAILURE: Build failed with an exception.
-
What went wrong:
Execution failed for task ':app:installDebug'.com.android.builder.testing.api.DeviceException: com.android.ddmlib.ShellCommandUnresponsiveException
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 29.7 secs
Could not install the app on the device, see the error above.
Activity
muraliv commentedon Sep 15, 2015
##I'm now getting this error:
:app:installDebug
Skipping device 'emulator-5554' (emulator-5554): Device is OFFLINE.
:app:installDebug FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:installDebug'.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 20.503 secs
Could not install the app on the device, see the error above.
[-][react-native run-android] app:installDebug error[/-][+][Android][react-native run-android] app:installDebug error[/+]muraliv commentedon Sep 15, 2015
The issue was with the Android Emulator. Changed the AVD settings to enable "Use Host GPU" and the issue was resolved.
foghina commentedon Sep 15, 2015
Yes, this is a problem with the Android SDK being super slow sometimes:
ShellCommandUnresponsiveException
means installing the APK (simply runningadb install
) timed outNo online devices found
means the emulator went into a bad state and is not responding to anyadb
commandsUsing the host GPU and hardware acceleration (HAXM on OSX / Windows, KVM on Linux) usually helps with this. Or switching to Genymotion.
However, there is nothing we can do about this, since the problem is with the Android tooling. Thus, I'm closing this issue.
leoabacade commentedon Sep 18, 2015
@muraliv. you are right, thank you (github needs up-vote function)
mzabriskie commentedon Oct 9, 2015
@muraliv thanks for the solution!
jixiaod commentedon Oct 20, 2015
@muraliv Using the host GPU not work for me. still get
......
:app:validateDebugSigning
:app:packageDebug UP-TO-DATE
:app:zipalignDebug UP-TO-DATE
:app:assembleDebug UP-TO-DATE
:app:installDebug
Skipping device 'emulator-5554' for 'app:debug': Unknown API Level
:app:installDebug FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:installDebug'.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 27.609 secs
Could not install the app on the device, see the error above.
any solutions ?
ericcch commentedon Oct 25, 2015
@jixiaod In case you missed it, you need to start your emulator before running "react-native run-android"
satya164 commentedon Oct 25, 2015
You can also try Genymotion, it's much faster than the Android Emulator.
swdevbali commentedon Dec 14, 2015
hm, my emulator from genymotion is running, but I also got this error. any suggestion?
puresteelzhang commentedon Dec 17, 2015
Try:
1、open android Emulator;
2、react-native run-android; error??!! goto 3;
3、adb install app/build/outputs/apk/app-debug.apk;
verystrongjoe commentedon Feb 19, 2016
@jixiaod any update? I got the error you got.
csholmq commentedon Feb 28, 2016
@swdevbali Same here. Is Genymotion somehow not targeted?
27 remaining items
Karandeep-Saluja commentedon Dec 12, 2017
@Kimmer12 I too got the same error. I figured out that I have some error with the adb and that on typing adb devices nothing shows up. Do you know any tweaks to resolve this?
Cody1988 commentedon Dec 30, 2017
@phemonick it works for me with real android device
blackinitial commentedon Jan 19, 2018
@phemonick same, it's work for me.
and don't forget to check allow always connect when notification of rsa, so no error again :)
katerynajeeva commentedon Jan 22, 2018
@Kimmer12, @bashirk, I had the same problem (waiting for infinity on 97%...), I resolved it by choosing another virtual device preferences in the AVD Manager: it should be "Android 6.0 - API Level 23 - Intel Atom (x86_64)"
katerynajeeva commentedon Jan 22, 2018
@Karandeep-Saluja I had this problem too, I guess you have no virtual device installed.
in Android Studio)
Can you see any devices listed in your AVD Manager?
(You can open the AVD manager using this icon
If no, you have to create one just clicking on " + Create Virtual Device..."
Karandeep-Saluja commentedon Jan 23, 2018
@kate-kholyavkina I figured out the solution. The platform-tools installed on my system was faulty. Had to download one from https://developer.android.com/studio/releases/platform-tools.html
miaraya commentedon Jan 26, 2018
@GerryQuest That worked for me, thank you!
mustafa-kahraman commentedon Feb 12, 2018
I had same issue with real device, I changed the cable its fixed...
I have 2 devices for test. (samsung s7 and samsung e7) first cable was working with s7 but the same cable did not work with e7...
jenskuhrjorgensen commentedon Mar 16, 2018
As @muraliv suggested, I tried changing the graphics, but turns out that is not possible for Google Play enabled devices (which I was using). Created a new AVD without Google Play and it worked - thanks :D
Iliyass commentedon Apr 20, 2018
this also happens when you have two
adb devices
showing up, that's why @phemonick solution worksprejithp commentedon May 29, 2018
I worked around this issue by just restarting the emulator and sometimes, keeping Android Studio open in the background while running
npm run android
seems to work for meerhanbicer commentedon Jul 11, 2018
@phemonick it's worked
muhammadsr commentedon Jul 11, 2018
Deleting the simulator and creating a new might help