How to `mobile-install` a desugared app that has JDK 21 dependencies?

Open
#510 2 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 6 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
android, java

Research direction

Start by reproducing the failure through mobile-install with a dependency built for JVM 21, then trace how the Java tools invoke DesugarDexSharding under JDK 17. Determine the supported way to handle class file major version 65 and document what eventual fix is required.

Written by the indexing model from the issue text.

Description

I'm building an app that depends on a library specifically built for JVM 21. As the java tools use JDK 17, there's an error from DesugarDexSharding:

Error: java.lang.IllegalArgumentException: Unsupported class file major version 65

What's the recommended way to deal with this, and what will be the eventual fix?

Dominant language
Java
Stars
205
Forks
113
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bazelbuild/rules_android

All issues in bazelbuild/rules_android

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.