Skip to content

[Android][react-native run-android] app:installDebug error #2711

Closed
@muraliv

Description

@muraliv

[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

muraliv commented on Sep 15, 2015

@muraliv
Author

##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'.

    com.android.builder.testing.api.DeviceException: No online devices found.

  • 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.

changed the title [-][react-native run-android] app:installDebug error[/-] [+][Android][react-native run-android] app:installDebug error[/+] on Sep 15, 2015
muraliv

muraliv commented on Sep 15, 2015

@muraliv
Author

The issue was with the Android Emulator. Changed the AVD settings to enable "Use Host GPU" and the issue was resolved.

foghina

foghina commented on Sep 15, 2015

@foghina
Contributor

Yes, this is a problem with the Android SDK being super slow sometimes:

  • ShellCommandUnresponsiveException means installing the APK (simply running adb install) timed out
  • No online devices found means the emulator went into a bad state and is not responding to any adb commands

Using 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

leoabacade commented on Sep 18, 2015

@leoabacade

@muraliv. you are right, thank you (github needs up-vote function)

mzabriskie

mzabriskie commented on Oct 9, 2015

@mzabriskie

@muraliv thanks for the solution!

jixiaod

jixiaod commented on Oct 20, 2015

@jixiaod

@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'.

    Failed to install on any devices.

  • 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

ericcch commented on Oct 25, 2015

@ericcch

@jixiaod In case you missed it, you need to start your emulator before running "react-native run-android"

satya164

satya164 commented on Oct 25, 2015

@satya164
Contributor

You can also try Genymotion, it's much faster than the Android Emulator.

swdevbali

swdevbali commented on Dec 14, 2015

@swdevbali

hm, my emulator from genymotion is running, but I also got this error. any suggestion?

puresteelzhang

puresteelzhang commented on Dec 17, 2015

@puresteelzhang

Try:
1、open android Emulator;
2、react-native run-android; error??!! goto 3;
3、adb install app/build/outputs/apk/app-debug.apk;

verystrongjoe

verystrongjoe commented on Feb 19, 2016

@verystrongjoe

@jixiaod any update? I got the error you got.

csholmq

csholmq commented on Feb 28, 2016

@csholmq
Contributor

@swdevbali Same here. Is Genymotion somehow not targeted?

27 remaining items

Karandeep-Saluja

Karandeep-Saluja commented on Dec 12, 2017

@Karandeep-Saluja

@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

Cody1988 commented on Dec 30, 2017

@Cody1988

@phemonick it works for me with real android device

blackinitial

blackinitial commented on Jan 19, 2018

@blackinitial

@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

katerynajeeva commented on Jan 22, 2018

@katerynajeeva

Building 97% > :app:installDebug

@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

katerynajeeva commented on Jan 22, 2018

@katerynajeeva

on typing adb devices nothing shows up

@Karandeep-Saluja I had this problem too, I guess you have no virtual device installed.
Can you see any devices listed in your AVD Manager?
(You can open the AVD manager using this icon 1_sucjpr_zxzh8n6tbpriyaq in Android Studio)
If no, you have to create one just clicking on " + Create Virtual Device..."

Karandeep-Saluja

Karandeep-Saluja commented on Jan 23, 2018

@Karandeep-Saluja

@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

miaraya commented on Jan 26, 2018

@miaraya

@GerryQuest That worked for me, thank you!

mustafa-kahraman

mustafa-kahraman commented on Feb 12, 2018

@mustafa-kahraman

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

jenskuhrjorgensen commented on Mar 16, 2018

@jenskuhrjorgensen

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

Iliyass commented on Apr 20, 2018

@Iliyass

this also happens when you have two adb devices showing up, that's why @phemonick solution works

prejithp

prejithp commented on May 29, 2018

@prejithp

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 me

erhanbicer

erhanbicer commented on Jul 11, 2018

@erhanbicer

@phemonick it's worked

muhammadsr

muhammadsr commented on Jul 11, 2018

@muhammadsr

Deleting the simulator and creating a new might help

locked as resolved and limited conversation to collaborators on Jul 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mzabriskie@mkonicek@lyahdav@foghina@swdevbali

        Issue actions

          [Android][react-native run-android] app:installDebug error · Issue #2711 · facebook/react-native