Skip to content

API-34: Support targeting JDK 17 #8304

@MihaMarkic

Description

@MihaMarkic

Android application type

Classic Xamarin.Android (MonoAndroid12.0, etc.)

Affected platform version

VS 2022 17.x

Description

I'm trying to create a binding library for an .aar library that targets JDK 17

kotlin {
      jvmToolchain(17)
  }

I'm getting this error: javac.exe error JAVAC0000: class file has wrong version 61.0, should be 55.0

And there seems no way to use (Open)JDK 17 as VS build really really wants to use 11 even if 17 is installed as well.
Is there any way to use JDK 17? Hopefully official support is planned soon.

Steps to Reproduce

  1. Create a binding library for emarsys:core-api:3.6.0 but I guess any similar library targeting JDK 17 will do.
  2. When compiling client for library created in step above, javac.exe compiler will produce errors mentioned in description.

Did you find any workaround?

Use an older version of the library that targets JDK 11.

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions