I like to use compileSdkVersion 30
and targetSdkVersion 30
in my Android project. Once I push the branch to Travis CI then the build fails with the following error:
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? How can I resolve the build failure?