The install-missing-android-tools build step started failing this morning when it gets to accepting licenses for build-tools 28.0.3. We upgraded our system for Android Studio 2.3.3 a few days ago.
Ensure required Android SDK components
Retrying...
Failed to ensure android components, error: output: Running exec java -Dorg.gradle.appname=gradlew - classpath /bitrise/src/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain dependencies --stacktrace
Parallel execution is an incubating feature.
> Configure project :hbmx
Checking the license for package Android SDK Build-Tools 28.0.3 in /opt/android-sdk-linux/licenses
Warning: License for package Android SDK Build-Tools 28.0.3 not accepted.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':hbmx'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;28.0.3 Android SDK Build-Tools 28.0.3
Running into the same issue with this PR which upgrades Gradle from 3.1.4 to 3.3.0. My logs look pretty similar. This also happens if I change compileSdkVersion from 27 to 28.
The weird thing is that I would expect the current Docker image to still work, given the PR that resolved the previous issue which appears to accept all licenses. I wonder if something changed about the sdkmanager tool.
I started trying to work around the problem briefly, but then I found this thread. I hope this can be resolved soon.
From what I can see indeed the main part of the issue is the same as in the old one. android-sdk-license license has changed.
As a workaround you can add script step with content like this before install-missing-android-tools step: yes |sdkmanager --install "build-tools;28.0.3"
It will accept the license for both build tools 28.0.3 and platform 28.
Or you can write the following content to $ANDROID_HOME/licenses/android-sdk-license:
Thanks, @koral! I totally whiffed on the fact that the Docker build wouldn’t get regenerated. We switched to LTS after that NDK issue broke our build a few months ago, and it looks like other subsequent changes to our build config have made it possible for us to go back to the non-LTS image. I ran a successful build that I just need to go test out.