Monday, 31 August 2020

Please accept all necessary Android SDK licenses

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:

  • Go to Configure>SDK Manager in your Android Studio. Select SDK Tools tab and install Google Play Licensing Library
  • Open Android Studio, then click the gear icon (Configure). Press the SDK Manager option. Three tabs should be displayed, press the SDK Tools tab. After that, make sure that Android SDK Build-Tools, Android SDK Platform-Tools and Android SDK Tools are updated. Check them and press Apply.
  • Installing v28 of Android SDK and opened a Pixel 2 VD running v28.
  • Run Powershell C:\users\steve\appdata\local\Android\Sdk\tools\bin> ./sdkmanager.bat --licenses. I receive the error:

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.



from Please accept all necessary Android SDK licenses

No comments:

Post a Comment