Unable to specify build-tools-30.0.1 and accept license

I specified the latest build-tools 30.0.1 for my Android project. Once I let it run it fails:

...
> Task :buildSrc:check
> Task :buildSrc:build
File /home/travis/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Build-Tools 30.0.1 in /usr/local/android-sdk/licenses
Warning: License for package Android SDK Build-Tools 30.0.1 not accepted.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:testCcc36c3DebugUnitTest'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
     build-tools;30.0.1 Android SDK Build-Tools 30.0.1
  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

Here is the associated build. Can you please install the latest build-tools to the trusty instances?

Related

I filed a bug at Google’s issue tracker now: https://issuetracker.google.com/issues/162255866
Feel free to “star” it to let Google know that you are interested in a solution, too.

No change. I updated the Google issue in the hope to get answers.

I also have this problem.

* What went wrong:
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
     build-tools;30.0.2 Android SDK Build-Tools 30.0.2
     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

Nothing has happened in the Google issue. :slightly_frowning_face: Meanwhile, build tools 30.0.3 is available.

You should always make sure that all licenses are accepted. Easiest solution is to use the sdkmanager: https://github.com/G00fY2/DeveloperWidget/blob/4843191b9089d377e1bafeb21adfbbd4ee5b66d7/.travis.yml#L34