"Failed to Install the Following Android Sdk Packages as Some Licences Have Not Been Accepted" Error

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

Failed to install the following Android SDK packages as some licences have not been accepted.- 20.1.5948944 NDK (Side by side) 20.1.5948944

When you install Android Studio 3.5.2, the android studio doesn't install NDK(Side By side) so, you need to do it manually. Tools -> SDK Manager -> System Settings -> Android SDK -> (Select) SDK Tool and enable NDK(Side by Side).

Failed to install the following Android SDK packages as some licences have not been accepted. platform 29

I fixed the problem copying the licenses into /usr/lib/android-sdk

sudo cp -R licenses /usr/lib/android-sdk

Android Studio licences have not been accepted error

After searching through the internet and try to apply various solutions, I found out that below the warning Failed to install the following Android SDK packages ... there was a link to download the Android SDK Build-Tools 29.0.2 which I had'nt noticed before, on clicking on it I was presented with the licence agreement which after I accepted, the build tools were downloaded and the error went way and the app started building fine.

Thank you all for your help.



Related Topics



Leave a reply



Submit