# Android Build Tools 26.0.2 license agreement not accepted

**URL:** <https://discuss.bitrise.io/t/android-build-tools-26-0-2-license-agreement-not-accepted/2964>\
**Category:** Issues\
**Tags:** android\
**Created:** [October 11, 2017, 10:48am UTC](https://discuss.bitrise.io/t/android-build-tools-26-0-2-license-agreement-not-accepted/2964 "2017-10-11T10:48:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![danieldapadmi](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/danieldapadmi/32/880_2.png) [@danieldapadmi](https://discuss.bitrise.io/u/danieldapadmi)\
**Post date:** [October 11, 2017, 10:48am UTC](https://discuss.bitrise.io/t/android-build-tools-26-0-2-license-agreement-not-accepted/2964/1 "2017-10-11T10:48:27Z")

</div>

We updated to build tools 26.0.2 on 4th October, and all builds since then have worked - but this morning builds started failing. The Install Missing Android Tools build step is failing with:

> File /root/.android/repositories.cfg could not be loaded.  
> Checking the license for package Android SDK Build-Tools 26.0.2 in /opt/android-sdk-linux/licenses  
> Warning: License for package Android SDK Build-Tools 26.0.2 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 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 [Exporting licenses - Android Studio Project Site](http://d.android.com/r/studio-ui/export-licenses.html)

Licenses have been exported and copied in as a workaround, but the same error is occurring.  
The stack is Android & Docker, on Ubuntu 16.04. All builds steps are at the latest version. Previously successfully building branches are also now failing, even though they have not been changed.

Has something changed with the VM?

---

<div class="post-metadata">

**Author:** ![danieldapadmi](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/danieldapadmi/32/880_2.png) [@danieldapadmi](https://discuss.bitrise.io/u/danieldapadmi)\
**Post date:** [October 11, 2017, 11:00am UTC](https://discuss.bitrise.io/t/android-build-tools-26-0-2-license-agreement-not-accepted/2964/2 "2017-10-11T11:00:54Z")

</div>

An issue has been opened on the Install Missing Android Tools Github repo: [https://github.com/bitrise-steplib/steps-install-missing-android-tools/issues/22](https://github.com/bitrise-steplib/steps-install-missing-android-tools/issues/22)

---

<div class="post-metadata">

**Author:** ![koral](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/koral/32/357_2.png) [@koral](https://discuss.bitrise.io/u/koral)\
**Post date:** [October 11, 2017, 11:42am UTC](https://discuss.bitrise.io/t/android-build-tools-26-0-2-license-agreement-not-accepted/2964/3 "2017-10-11T11:42:34Z")

</div>

According to [https://dl.google.com/android/repository/repository2-1.xml](https://dl.google.com/android/repository/repository2-1.xml) Android SDK license has changed on 2017-10-10 17:06:30. So previous agreement is not valid.  
There is already a PR in docker image repo: [https://github.com/bitrise-docker/android/pull/124/commits/53defa46d5e07e16fcebf33590be588413935e99#diff-3254677a7917c6c01f55212f86c57fbfR41](https://github.com/bitrise-docker/android/pull/124/commits/53defa46d5e07e16fcebf33590be588413935e99#diff-3254677a7917c6c01f55212f86c57fbfR41)

Something similar can be done for Install missing Android tools step.  
As a workaround you can e.g. accept licenses manually in script step.

---

<div class="post-metadata">

**Author:** ![danieldapadmi](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/danieldapadmi/32/880_2.png) [@danieldapadmi](https://discuss.bitrise.io/u/danieldapadmi)\
**Post date:** [October 11, 2017, 11:57am UTC](https://discuss.bitrise.io/t/android-build-tools-26-0-2-license-agreement-not-accepted/2964/4 "2017-10-11T11:57:32Z")

</div>

Looks like there is a PR for the Install Missing Android Tools build step too: [https://github.com/bitrise-steplib/steps-install-missing-android-tools/pull/21](https://github.com/bitrise-steplib/steps-install-missing-android-tools/pull/21)

I’ve worked around this by adding the hash from the build-step PR to my exported android licenses.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [October 11, 2017, 12:24pm UTC](https://discuss.bitrise.io/t/android-build-tools-26-0-2-license-agreement-not-accepted/2964/5 "2017-10-11T12:24:27Z")

</div>

Fix is on its way, should be released soon: [https://github.com/bitrise-steplib/steps-install-missing-android-tools/pull/23](https://github.com/bitrise-steplib/steps-install-missing-android-tools/pull/23)

Sorry for the inconvenience - we’ll do a revision on the license handling code in the step once the quickfix is released, to avoid similar issues in the future.

---

<div class="post-metadata">

**Author:** ![erosdome](https://avatars.discourse-cdn.com/v4/letter/e/9fc348/32.png) [@erosdome](https://discuss.bitrise.io/u/erosdome)\
**Post date:** [October 11, 2017, 1:46pm UTC](https://discuss.bitrise.io/t/android-build-tools-26-0-2-license-agreement-not-accepted/2964/6 "2017-10-11T13:46:22Z")

</div>

Fix is released:

> [@Install missing Android SDK components v2.0.3](http://discuss.bitrise.io/t/install-missing-android-sdk-components-v2-0-3/2969):
>
> We released a new version ([2.0.3](https://github.com/bitrise-steplib/steps-install-missing-android-tools/releases/tag/2.0.3)) of Install missing Android SDK components step. Changes: fixed android/sdkmanager license issues
