Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

run-android does not run due to not accepted license agreements

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring project ':app'.

    You have not accepted the license agreements of the following SDK components: [Android SDK Platform 23, Android SDK Build-Tools 23.0.1]. Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager. Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output

What do I do in such situation?

like image 587
Zivanovic Avatar asked May 21 '17 17:05

Zivanovic


2 Answers

If opening SDK Manager in Android Studio:

  1. Open the Android SDK Manager.

  2. Click the "SDK Tools" tab and check the "Show Package Details" checkbox at the bottom right of the screen.

  3. Check the 23.0.1 option under "Android SDK Build-Tools".

  4. Click "Apply". You should be prompted with a license agreement. Accept the license and you're done.

  5. Try rerunning your react-native app.

If not using Android Studio:

  1. Open SDK Manager in your Android SDK Folder (possibly in tools or platform-tools folder)

  2. Check the box next to "Android SDK Build-tools" where the version number is 23.0.1.

  3. Click "Install 1 package" (it may be a different number. Uncheck other boxes if you don't want to install/update anything else)

  4. You should be presented with a license agreement sometime. Accept it and let the SDK Manager install the stuff for you.

  5. Try rerunning your react-native app.

like image 111
Marc Avatar answered Oct 06 '22 01:10

Marc


Try to run:

$ANDROID_HOME/tools/bin/sdkmanager --licenses

That should follow you to accepting all necessary licenses

like image 39
Aliaksei Avatar answered Oct 06 '22 01:10

Aliaksei