React Native, Failed to launch emulator. Reason: No emulators found as an output

17,157

Solution 1

You can fix it by using the command :

react-native doctor

This command shows all issues that need to be fixed.

enter image description here

Press f to fix the issues and don't forget to restart your windows

And after then open the emulator before running your project. Once emulator opened, run command: react-native run-android

After fixed:

enter image description here

Don't forget to give me an upvote if that's work.

Solution 2

In My Case, I have to re-run the command in the same terminal where you are trying to run npx react-native run-android

Step 1. paste the source command first

source ~/.bash_profile OR source ~/.bashrc

Step 2. RUN Next command

npx react-native run-android

Solution 3

set your AVD manager path and JDK path like this , also you have to add Android Home path Environment variables

Share:
17,157
Dark Prince
Author by

Dark Prince

Updated on June 09, 2022

Comments

  • Dark Prince
    Dark Prince almost 2 years

    I'm trying to run my react native app in emulator by using command react-native run-android but it's throwing that error

    Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
    Use '--warning-mode all' to show the individual deprecation warnings.
    See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings
    
    BUILD SUCCESSFUL in 44s
    info Connecting to the development server...
    warn Failed to connect to development server using "adb reverse": spawnSync /Opt/Android/platform-tools/adb ENOENT
    info Starting the app...
    The system cannot find the path specified.
    error Failed to start the app. Run CLI with --verbose flag for more details.
    Error: Command failed: /Opt/Android/platform-tools/adb shell am start -n com.reactproject/com.reactproject.MainActivity
        at makeError (C:\Users\Danger World\ReactProject\node_modules\execa\index.js:174:9)
    

    I already setup my android studio and sdk manager, avd manager like it's shown in doc also I already set path but it's still showing that error, anyone know why? Can anyone help please?

  • Oğulcan Karayel
    Oğulcan Karayel about 3 years
    Thanks but do i have to every time write this before step 2 ? is there any global way to fix this
  • Anirudh babbar
    Anirudh babbar almost 3 years
    Thank you very much! You saved my day!
  • Sriram90
    Sriram90 about 2 years
    Much appreciated. This helped me to fix the problem.