React Native | Failed to Install the App. Please Accept All Necessary Sdk Licenses Using Sdk Manager

React Native | Failed to install the app. Please accept all necessary SDK licenses using SDK Manager

Go to Configure>SDK Manager in your Android Studio.

Select SDK Tools tab and install Google Play Licensing Library

React Native Android SDK packages as some licences have not been accepted (Windows)

To solve the problem, you need to accept all required Android SDK licenses. Just execute one of the following commands.

Windows:

cmd.exe /C"%ANDROID_HOME%\tools\bin\sdkmanager.bat --licenses"

macOS

yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses

Failed to install the following Android SDK packages as some licences have not been accepted error

You need to accept the licences before building.

According to Android SDK docs you can use the following command depending on the sdkmanager location: Docs on --licenses option seems to be missing though.

yes | sdkmanager --licenses

GNU/Linux Distributions:

yes | ~/Android/Sdk/tools/bin/sdkmanager --licenses

macOS:

export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home
yes | ~/Library/Android/sdk/tools/bin/sdkmanager --licenses

Windows:

%ANDROID_HOME%/tools/bin/sdkmanager --licenses

Flutter:

> flutter doctor --android-licenses

whenever I run new project in react-native i get error message that is android sdk license are not accepted how to get rid with this permanently?

Here is a link that will help you: You have not accepted the license agreements of the following SDK components

You need to accept the licenses through the terminal/prompt

e.g on linux:

cd ~/Library/Android/sdk/tools/bin/

Run the sdkmanager as follows:

./sdkmanager --licenses

e.g on Windows:

cd /d "%ANDROID_SDK_ROOT%/tools/bin"

Run the sdkmanager as follows:

sdkmanager --licenses

And accept the licenses you did not accept yet (but need to).

Automatically accept all SDK licences

UPDATE 2021
This should be the accepted answer as its easy and upto date


AndroidSDK can finally accept licenses.

Go to Android\sdk\tools\bin

yes | sdkmanager --licenses

EDIT:

as pointed out in the comments by @MoOx, on macOS, you can do

yes | sudo ~/Library/Android/sdk/tools/bin/sdkmanager --licenses

as pointed out in the comments by @pho, @mikebridge and @ Noitidart on Windows, you can do

cmd.exe /C"%ANDROID_HOME%\tools\bin\sdkmanager.bat --licenses"

be sure to install java before



Related Topics



Leave a reply



Submit