Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 965
Dark Prince Avatar asked Dec 03 '22 09:12

Dark Prince


1 Answers

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.

like image 183
sophin Avatar answered Dec 04 '22 23:12

sophin