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

Created on 28 Sep 2015  Â·  19Comments  Â·  Source: facebook/react-native

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!

Locked

Most helpful comment

Launch the simulator and try running again.

All 19 comments

What does adb devices print? If debugging mode turned on in your phone?

I have not plug real phone for running app.
I want to run app on "virtual android" simulator as like as xcode emulator

Launch the simulator and try running again.

It works.
Thanks all

@ide how to launch the simulator on its own? Cordova has always launched it for me so far

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

In my case, It was on my device.
http://facebook.github.io/react-native/releases/0.23/docs/android-setup.html#troubleshooting
On Terminal, I made step 1 and after run react-native start at root directory and then on other table run react-native run-android.

Further to @TheNotary comment. Instead of creating your Android Virtual Device (AVD) from the command line with android create ...), you may find creating the AVDs with a GUI interface much easier (where you can see all the options available) by just opening the Android Virtual Device (AVD) Manager with android avd

So, basically everytime want to react-native run-android I first have to go to ../Library/Android/sdk/tools and run emulator -avd <avd_name>, wait until the emulator loads and then run react-native run-android?

@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

close all simulators and run it again.

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

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

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

The image upload didn't work and only made a malware link :/

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

On Tue, 17 Jul 2018 at 21:13, TheNotary notifications@github.com wrote:

The image upload didn't work and only made a malware link :/

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/issues/3091#issuecomment-405648379,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AnbCO8xKzfxiNSauCojQqpF5X05vCjTFks5uHhQmgaJpZM4GEt-e
.

i repair link
this file edit memu and need to turn off antivirus 3 second for install

Ok, I got the mailware to download correctly, but now it says:

This malware requires Windows 7 and above to work.  

What should I do if I'm on a real operating system like Debian?

im sorry
my program dont work on linux base

On Wed, Jul 18, 2018, 2:43 AM TheNotary notifications@github.com wrote:

Ok, I got the mailware to download correctly, but now it says:

This malware requires Windows 7 and above to work.

What should I do if I'm on a real operating system like Debian?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/issues/3091#issuecomment-405745078,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AnbCOzhmtCA_mvme81Pjwxj5jUwtYZTnks5uHmFtgaJpZM4GEt-e
.

Was this page helpful?
0 / 5 - 0 ratings