Reputation: 123
I just installed Android Studio on a new device and during my first project I get this error:
License for package Android SDK Build-Tools 30.0.2 not accepted.
Please, what should I do?
Upvotes: 10
Views: 17808
Reputation: 121
In Android Studio:
Tools
-> SDK Manager
Android SDK
and then the SDK Tools
tabGoogle Play Licensing Library
and click on OK
to install it
Now your error should be all gone, if not, restart your Android Studio.
Upvotes: 12
Reputation: 31
I got exactly same error on Windows 10 but above solution didn't work for me. As this error was specially pointing towards 30.0.2, I checked in Android Studio under Tools>>SDK Manager>> SDK Platforms and found that only latest Android 12.0(S) with API level 31 was installed. I checked Android 11.0(R) to install API level 30 and error got resolved. Screenshot for solution
Upvotes: 3
Reputation: 3566
For Linux
Go to Android\sdk\tools\bin
yes | sdkmanager --licenses
For MacOS
yes | sudo ~/Library/Android/sdk/tools/bin/sdkmanager --licenses
For Windows
cmd.exe /C"%ANDROID_HOME%\tools\bin\sdkmanager.bat --licenses"
Make sure that Java is installed before hand
Credits to this answer
Upvotes: 3