react-native: Failed run android simulator : No connected devices!

I try to run app on android simulator but failed

: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 connected devices!

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 46
  • Comments: 19 (3 by maintainers)

Most upvoted comments

Launch the simulator and try running again.

Google brought me here, thought I’d share notes:

If you don’t have any devices listed from adb devices You’ll want to start by creating an Android Virtual Device image.

$  android create avd -n <name> -t <target> --abi default/x86_64

<name> can be anything, such as react, <target> should be one of the options produced by the below command…

$  android list targets

If that listing is empty, use the android command’s GUI to install a target platform and such.

When you have the platform, and the device, you can then boot the device with emulator:

$  emulator -avd <name>

Once booted, the command you were likely trying to run react-native run-android should produce the effect of a react mobile app running in your emulator window.

See: http://stackoverflow.com/questions/4974568/how-do-i-launch-the-android-emulator-from-the-command-line

@nvcken I think that you have the same problem with two adb in your machine.

Please remove android-tools-adb because it’s outdated and appoint /usr/bin/adb to adb from Android SDK and try it again. 😉

See more about how I solved that in this issue https://github.com/luggit/react-native-config/issues/202

by this file memu adb and memu ide and memu connect problem solved

http://cdn.persiangig.com/download/e8HZsJdyji/memu repair.exe/dl

FWIW, some of the above advice is out-dated…

$ android list target
*************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
Running /usr/lib/android-sdk/tools/bin/avdmanager list target