Setting up a React Native development environment on Windows for the first time, I create a new React Native project, cd into it, and run react-native run-android
. I receive the error:
info Starting JS server... The system cannot find the path specified. 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.error Failed to install the app. Please accept all necessary Android SDK licenses using Android SDK Manager: "$ANDROID_HOME/tools/bin/sdkmanager --licenses". Run CLI with --verbose flag for more details. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
I've tried:
Warning: File C:\Users\steve\ .android\repositories.cfg could not be loaded. All SDK package licenses accepted.======] 100% Computing updates...
I've created a blank C:\Users\steve\ .android\repositories.cfg file, and started an Android emulator through Android Studio, but receive the same error.
if you are windows machine run following command
cmd.exe /C"%ANDROID_HOME%\tools\bin\sdkmanager.bat --licenses"
if you are macOS run following command
yes | sudo ~/Library/Android/sdk/tools/bin/sdkmanager --licenses
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With