-
Notifications
You must be signed in to change notification settings - Fork 71
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
UnsupportedClassVersionError: AndroidLocationsProvider (class file version 55.0) #378
Comments
Same issue here. trace
Fortunately, my project had already migrated from JDK8 to JDK11, and simply removing the JDK8 reference from workflow solved the issue. Here is an example of the change in my project. diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml
index 403b46913..f5fd01c1f 100644
--- a/.github/actions/setup/action.yml
+++ b/.github/actions/setup/action.yml
@@ -8,7 +8,7 @@ runs:
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
- java-version: '8'
+ java-version: '11'
- uses: actions/cache@v3
with:
path: |
@@ -18,9 +18,5 @@ runs:
key: ${{ inputs.cache_key }}
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- - uses: actions/setup-java@v3
- with:
- distribution: 'adopt'
- java-version: '11'
- run: make publish-local
shell: bash |
Yeah, I started upgrading my project from Java 8 to Java 19 too (not results yet, in progress), it should hide this problem. The weirdest thing is it being random. Also follow https://issuetracker.google.com/issues/266618722 in case they update the docs and confirm my suspicion. |
We currently run into android-actions/setup-android#378
Sorry mates, took me a while. I have no idea why it was sporadic, but this is JDK version issue. I am not sure about cmdline-tools 10.0, but current version 11.0 requires JDK 17. setup-android action runs sdkmanager (part of cmdline-tools) as part of it's install process, this means that the action requires the same JDK version that is required by the cmdline-tools. @TWiStErRob , @S64 , is it reasonable for me to expect y'all to just upgrade to JDK17 (or later) or is it necessary for us to make something work with JDK11? |
Since AGP 8 requires JDK 17 too, this requirement is more relaxed from your side, unless projects use AGP pre-8 + latest Android SDK. This should cover "normal" use cases. This pattern might help to run Gradle and Android SDK on latest JDK, but keep testing lower versions. However, I for example have a Gradle plugin where I test compatibility and run older AGP/Gradle GitHub actions matrix where I need to use Java 11 (because old AGP/Gradle CANNOT run on Java 17). To work around this I use essentially following order: Is it possible to specify a Java version internally akin to? Line 6 in 9584f05
This would allow setup-android to use the right version, and the outer world could have whatever they desire or nothing at all.
|
Few thousand lines of yaml later... It would be possible to set up your own Java if this was implemented: However the action would need to be wrapped in a |
Hi, I started sporadically getting this error yesteday:
It happens randomly. I have a big matrix 38 jobs, 23 of them use Java 8, and 2-3 of them randomly chosen of the 23 fail with the above.
My guess is that
cmdline-tools:latest
was just released with a requirement on Java 11. And thissetup-android
action is just showing the problem, not causing it. Reported here anyway just in case you know anything, and others are looking at the same problem.Example fail: https://github.com/TWiStErRob/net.twisterrob.gradle/actions/runs/3939418181/jobs/6862851517
(Note that it is Attempt 2, because the original Attempt 1 execution didn't fail, and because it's on master nothing has changed since Attempt 1 in my code.)
The only other reference to this I found: https://ask.csdn.net/questions/7878632
The text was updated successfully, but these errors were encountered: