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
Android Webview Err_Unknown_Url_Scheme
Actionbaractivity Is Deprecated
Sharing Data Between Fragments Using New Architecture Component Viewmodel
How to Handle Handler Messages When Activity/Fragment Is Paused
Transfer Data Between iOS and Android via Bluetooth
Get and Parse CSV File in Android
Listview Subobject Clickable Confilct
Broadcast Receiver Within a Service
Service Won't Stop When Stopservice Method Is Called
Get Text from Web Page to String
Facebook Key Hash Does Not Match Any Stored Key Hashes
Android - Local Image in Webview
Android Studio Error "Installed Build Tools Revision 31.0.0 Is Corrupted"
Android Webview Not Loading an Https Url
How to Send an Email with a File Attachment in Android
Cannot Get Folderid That I Just Created on Google Drive
How to Prevent Android Bluetooth Rfcomm Connection from Dying Immediately After .Connect()