Seems like something’s not right with most recent build tools:
* What went wrong:
A problem occurred configuring project ':app'.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Build-Tools 26.0.2].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
Although this only happened after updating google services plugin to 3.1.1 and before that several builds after changing build tools to 26.0.2 did work properly.
The docker image on docker hub shows that it’s been updated 6 hours ago. But Android’s image in circle’s repository hasn’t been changed for almost 3 weeks. Might this be because some other image changed? Either way things don’t work
I recently migrated my CircleCI builds from 1.0 to 2.0 and they worked well for a few days, but today I got the build failure about SDK license without any change to config.yml:
> You have not accepted the license agreements of the following SDK components:
[Android SDK Build-Tools 26.0.2].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
The docker image I have in my config.yml is circleci/android:api-26-alpha (https://hub.docker.com/r/circleci/android/tags/), and I found that it has been updated several hours before and it seems the build failure occurred after that update…
I’ve got the same problem for just about any android api version I put in. Mine is supposed to be api 19, but there doesn’t seem to be an image anywhere. Also using 2.0 build. EDIT: Mine was also working as of yesterday, but popped up with this same warning.
thanks for prompt response, although note that this might not be the solution. Gradle already installs necessary build tools if they’re not present, and builds with build tools 26.0.2 have worked already. Has anything changed in last couple of hours? As I’ve noted, and well as s-nagahori has, circleCI android api-26-alpha tag has been updated recently, and only after that the builds stopped working
We have not changed anything on our end, but we do build a new image every night, so I guess we really make changes every night.
What I guess has happened is that Google might have updated something in SDK manager - maybe changed the text of the licenses? (The accepted licenses are stored as a SHA1 digest of the license text).
If you add sdkmanager --update && yes | sdkmanager --licenses as a build step does it help?
I added this step after my restore_cache step and before my gradlew dependencies step. This properly accepted and downloaded v26.0.2 build tools. Not a proper solution, but it works for now.
Sorry about the problems that you are having with this. It seems that Google have amended one of the Android SDK licenses today, and that exposed a bug in how I wrote the license accepting script in our Dockerfie. I’ve updated the CircleCI 2.0 image to accept the licenses properly - https://github.com/circleci/circleci-images/commit/1ac3ee07c1142291cafaf74c21b04fed46016a57 - this was the bug - the SDK manager would not update all components because the licenses had not yet been accepted.
I am seeing a similar license issue but with [Android Support Repository]. My build error also just started happening today, and occurs even when I rebuild a previously passing build.
Another user posted this here, but I thought I’d see if these two issues were linked.
Checking the license for package Android SDK Platform 25 in /opt/android/sdk/licenses
License for package Android SDK Platform 25 accepted.
Preparing “Install Android SDK Platform 25 (revision: 3)”.
“Install Android SDK Platform 25 (revision: 3)” ready.
Finishing “Install Android SDK Platform 25 (revision: 3)”
Installing Android SDK Platform 25 in /opt/android/sdk/platforms/android-25
“Install Android SDK Platform 25 (revision: 3)” complete.
“Install Android SDK Platform 25 (revision: 3)” finished.
Checking the license for package Android Support Repository in /opt/android/sdk/licenses
Warning: License for package Android Support Repository not accepted.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ‘:app’.
You have not accepted the license agreements of the following SDK components:
[Android Support Repository].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
Hi Marc,
I have started having this issue while trying to run my ionic application using cordova run android from the command line. I have tried the license fix excepting it multiple times but I still receive the error. Here is what it looks like:
[23:33:02] lint finished in 1.99 s
Checking the license for package Android SDK Platform 26 in /usr/lib/android-sdk/licenses
Warning: License for package Android SDK Platform 26 not accepted.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project ‘android’.
You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html