-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Github Actions error with Android Gradle plugin 8.2.0-alpha01 #7506
Comments
I'm not sure about
is 8.2.0 supposed to be supported by that action ? |
also |
I came across this same problem. |
I got the same, and not using Gradle Build Action, just plain Since AGP is requiring the new SDK build tools version, AGP must be compatible with that version. I don't think it's the way the licenses are accepted. I have a feeling the images on GHA side were built before the version in question existed, and then the new licences couldn't have been accepted while building the image. GHA has a lot of Android version installed, so the licences for those must be already accepted and cached. Therefore I think the license for stable build tools and RC are probably different. We will get stable Android 34 SDK tools in August-October this year, if Google follows the release cycle of past years. Could the pre-release SDK build tools version be added to GHA as pre-installed, similar to other versions? This would allow people to start using the latest AGP/Gradle combinations as soon as they want. |
Hello @AndreSand . Its correct behavior when new installed version ask to accept license. The main reason why this worked on previous versions is that the sdk used were already pre-installed on the image. As workaround you can install and accept license Build-Tools 34-rc3 in runtime by adding |
I did a bit more digging: Sources:
Note: |
I'm ignoring this version. An automated license acceptance makes little to no sense because it mentions that we need to accept the license as a kind of disclaimer for the effects of using an unstable alpha version. I truly appreciate the efforts but I personally prefer to test my projects with Beta, RC, or just a regular release version. |
This is done in order to overcome the below GitHub Actions CI failure with later alpha '8.2.0' AGP versions: ------------------------------------------------------------------------ FAILURE: Build failed with an exception. * What went wrong: Could not determine the dependencies of task ':android-test:extractDebugAnnotations'. > 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 ------------------------------------------------------------------------ For more info see: Github Actions error with Android Gradle plugin 8.2.0-alpha01 #7506 - actions/runner-images#7506
It would be super helpful if I'm maintaining tens of projects and it's a real drag to have to update all of their workflows to accept the licenses, and then remove those steps once the stable version is released. If Google sticks to their current strategy, this will be an issue every year. Also, as @TWiStErRob mentioned |
@TWiStErRob using the |
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:
Platforms affected
Runner images affected
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
Note: Only fails when we build using the latest Android gradle plugin version, Github Actions works fine using older Android gradle plugin versions.
The text was updated successfully, but these errors were encountered: