Reputation: 67
My ReactNative project for Android is being integrated and packaged using Azure Build Pipeline. It worked fine for months but a few days back I started getting this error:
Warning: License for package Android SDK Build-Tools 28.0.3 not accepted
I tried different Agents, but no luck.
The common solutions suggested to check-in the license files, but is there a better fix? Couldn't find much of other people talking about this, hence I assume this is not an issue with the Azure Build Pipleline.
[command]C:\Program Files\Git\bin\bash.exe D:\a\1\s\android\gradlew assembleRelease
Downloading https://services.gradle.org/distributions/gradle-4.6-all.zip
...
Checking the license for package Android SDK Build-Tools 28.0.3 in C:\Program Files (x86)\Android\android-sdk\licenses
Warning: License for package Android SDK Build-Tools 28.0.3 not accepted.
FAILURE: Build failed with an exception.
Upvotes: 1
Views: 718
Reputation: 3322
Go to Android SDK root folder (where tools folder exists inside it)
create licenses folder if not exists
create android-sdk-license file inside licenses folder if not exists
open android-sdk-license file as text file (with notepad)
paste following content inside the file and save it
8933bad161af4178b1185d1a37fbf41ea5269c55
d56f5187479451eabf01fb78af6dfcb131a6481e
24333f8a63b6825ea9c5514f83c2829b004d1fee
license location : sdkpath\licenses\android-sdk-license
Upvotes: 0
Reputation: 1997
I found a temp workaround here. Basically add a PowerShell step at the beginning of your build and set the license. Seems to be an issue for all Android related builds.
Upvotes: 1