Skip to content

CI fails with java.lang.UnsupportedClassVersionError in sdkmanager setup #5913

@gnprice

Description

@gnprice

In #5912, CI failed with the following error at the "Set up Android SDK" step:

Run android-actions/setup-android@v2
/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager cmdline-tools;7.0
Error: LinkageError occurred while loading main class com.android.sdklib.tool.sdkmanager.SdkManagerCli
	java.lang.UnsupportedClassVersionError: com/android/sdklib/tool/sdkmanager/SdkManagerCli has been compiled by a more recent version of the Java Runtime (class file version [6](https://github.com/chrisbobbe/zulip-mobile/actions/runs/12719855432/job/35460696276#step:4:7)1.0), this version of the Java Runtime only recognizes class file versions up to 55.0
/home/runner/work/_actions/android-actions/setup-android/v2/dist/index.js:2348
                error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
                        ^

Error: The process '/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager' failed with exit code 1
    at ExecState._setResult (/home/runner/work/_actions/android-actions/setup-android/v2/dist/index.js:2348:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/android-actions/setup-android/v2/dist/index.js:2331:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/android-actions/setup-android/v2/dist/index.js:2225:2[7](https://github.com/chrisbobbe/zulip-mobile/actions/runs/12719855432/job/35460696276#step:4:8))
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

Node.js v20.18.0

We should get CI working again.

I suspect the issue is just that the CI script needs to use a newer JDK, and possibly other upgrades.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions