Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React native failed to launch emulator

While trying to test the android app am creating with React native, I run into this error

info Launching emulator...
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.

I have the emulator(the AMD version) installed in the android studio.

How can I solve this problem

like image 638
gbenga ogunbule Avatar asked Feb 17 '20 16:02

gbenga ogunbule


People also ask

What is ADB in react native?

adb is a command line tools provided to interact with a connected android phone or emulator. It has many useful commands like apk installation, uninstallation, etc. It will show the list of devices or emulators currently connected/active.


1 Answers

In your scenario before running react native application you need to create emulator using Android Studio. You can view official documentation about running application on device by here

Before running your project make sure you have installed adb drivers - More

First of all create AVD using Android Studio.

Open your project android folder using Android Studio.

1. Click AVD Manager from Android Studio
enter image description here 2. Click Create Virtual Device enter image description here 3. Select your device from device list and click Next enter image description here 4. Select the android os version from the available version list and click Next enter image description here 5. On last keep default settings on device and click Finish enter image description here

After that you can see your available android emulator device list from AVD Manager window.

* Before run your react native application make sure you have turn on and run the android emulator from android studio

enter image description here

After that run your project using react-native run-android

like image 107
Akila Devinda Avatar answered Oct 08 '22 02:10

Akila Devinda