Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Github Actions error with Android Gradle plugin 8.2.0-alpha01 #694

Closed
AndreSand opened this issue Apr 28, 2023 · 2 comments
Closed

Comments

@AndreSand
Copy link

Description
Hi, I updated to the latest Android Studio Hedgehog(canary) and updated gradle plugin 8.2.0-alpha01. When I run on Github Actions I get the below error.

Error:

Downloading https://services.gradle.org/distributions/gradle-8.0-bin.zip
...........10%............20%............30%............40%............50%............60%...........70%............80%............90%............100%

Welcome to Gradle 8.0!

For more details see https://docs.gradle.org/8.0/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

Checking the license for package Android SDK Build-Tools 34-rc3 in /usr/local/lib/android/sdk/licenses
FAILURE: Build failed with an exception.

Warning: License for package Android SDK Build-Tools 34-rc3 not accepted.

  • What went wrong:
    Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;34.0.0-rc3 Android SDK Build-Tools 34-rc3
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
All licenses can be accepted using the sdkmanager command line tool:
sdkmanager.bat --licenses
Or, to transfer the license agreements from one workstation to another, see https://developer.android.com/studio/intro/update.html#download-with-gradle

Using Android SDK: /usr/local/lib/android/sdk
Platforms affected
Azure DevOps
GitHub Actions - Standard Runners
GitHub Actions - Larger Runners
Runner images affected
Ubuntu 20.04
Ubuntu 22.04
macOS 11
macOS 12
Windows Server 2019
Windows Server 2022
Image version and build link
Current runner version: '2.303.0'
Operating System:
Ubuntu 22.04.2
LTS
Runner Image:
Image: ubuntu-22.04

Is it regression?
Yes, it was working on previous gradle plugin versions

Expected behavior
New gradle releases builds Android successfully

Actual behavior
Currently GitHub image is not accepting the sdkmanager license.

Warning: License for package Android SDK Build-Tools 34-rc3 not accepted.

Repro steps
Use an Android project
Update to the latest gradle plugin version
Build on GitHub Actions
Note: Only fails when we build using the latest Android gradle plugin version, Github Actions works fine using older Android gradle plugin versions.

Related ticket:
actions/runner-images#7506

@cdsap
Copy link
Member

cdsap commented May 1, 2023

Hi @AndreSand, thanks for the report.
I tested locally, without using gradle-build-action: when I don't have installed/accepted the Android SDK Build-Tools 34-rc3 license, I get the same error:
Screenshot 2023-05-01 at 10 54 51 AM
Once I installed the SDK build tools, build works:
Screenshot 2023-05-01 at 10 58 54 AM

Checking the runner-images repo I see that the 34-rc3 is not included in the sdk components:
https:/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md#android

Looks like the issue is related to the runner-images repo

@bigdaz bigdaz closed this as completed May 1, 2023
@bigdaz bigdaz closed this as not planned Won't fix, can't repro, duplicate, stale May 1, 2023
@AndreSand
Copy link
Author

Hi @cdsap, Thank you for looking into issue.

Yes looks like the issue is with the Github runner-images.

Regards,
Andres

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants