# Failed to install the following Android 30 SDK

**URL:** <https://travis-ci.community/t/failed-to-install-the-following-android-30-sdk/11287>\
**Category:** Android\
**Tags:** build-env, travis-build\
**Created:** [March 12, 2021, 4:41pm UTC](https://travis-ci.community/t/failed-to-install-the-following-android-30-sdk/11287 "2021-03-12T16:41:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnjohndoe](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/johnjohndoe/32/4952_2.png) [@johnjohndoe](https://travis-ci.community/u/johnjohndoe)\
**Post date:** [March 12, 2021, 4:41pm UTC](https://travis-ci.community/t/failed-to-install-the-following-android-30-sdk/11287/1 "2021-03-12T16:41:56Z")

</div>

I like to use `compileSdkVersion 30` and `targetSdkVersion 30` in [my Android project](https://github.com/johnjohndoe/CampFahrplan/compare/master..sdk-30-updates). Once I push the branch to Travis CI then **the build fails** with the following error:

```bash
Task :buildSrc:build

File /home/travis/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Platform 30 in /usr/local/android-sdk/licenses
Warning: License for package Android SDK Platform 30 not accepted.
 
FAILURE: Build failed with an exception.  
* What went wrong:
Could not determine the dependencies of task ':app:testCcc36c3ReleaseUnitTest'.
> Could not resolve all dependencies for configuration ':app:androidApis'.
> Could not create task ':app:minifyCcc36c3ReleaseWithR8'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-30 Android SDK Platform 30

To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html  
Using Android SDK: /usr/local/android-sdk

```

Is there something wrong about [my configuration file](https://travis-ci.org/github/johnjohndoe/CampFahrplan/jobs/762618470/config)? How can I resolve the build failure?

---

<div class="post-metadata">

**Author:** ![johnjohndoe](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/johnjohndoe/32/4952_2.png) [@johnjohndoe](https://travis-ci.community/u/johnjohndoe)\
**Post date:** [March 13, 2021, 10:51am UTC](https://travis-ci.community/t/failed-to-install-the-following-android-30-sdk/11287/2 "2021-03-13T10:51:24Z")

</div>

I figured out that I need to add the following to the `.travis.yml` configuration file:

```auto
before_install:
- yes | sdkmanager "platforms;android-30"

```

The former configuration parameter `android-30` is not needed any more.

See: [Prepare Travis CI configuration for future Android SDK versions. · EventFahrplan/EventFahrplan@04d12c0 · GitHub](https://github.com/EventFahrplan/EventFahrplan/commit/04d12c09673ca82fb02b029e5e8551b02232fede)
