Skip to content
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

Unsupported class file major version 61 when running #494

Open
DanteAndroid opened this issue Sep 5, 2023 · 11 comments
Open

Unsupported class file major version 61 when running #494

DanteAndroid opened this issue Sep 5, 2023 · 11 comments

Comments

@DanteAndroid
Copy link

Library information:

  • Version: 'com.kizitonwose.calendar:compose:2.4.0-beta01'

Describe the bug**

IDE got Unsupported class file major version 61 when running project

@DanteAndroid
Copy link
Author

Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61
	at com.android.tools.r8.internal.U6.<init>(SourceFile:10)
	at com.android.tools.r8.internal.U6.<init>(SourceFile:2)
	at com.android.tools.r8.internal.U6.<init>(SourceFile:1)
	at com.android.tools.r8.graph.B0.a(SourceFile:15)
	at com.android.tools.r8.utils.w.a(SourceFile:98)
	at com.android.tools.r8.utils.w.a(SourceFile:95)
	at com.android.tools.r8.graph.B0.b(SourceFile:2)
	at com.android.tools.r8.dex.a$a.a(SourceFile:15)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:321)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
	at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:66)
	at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:36)
	at com.android.tools.r8.dex.a$a.a(SourceFile:12)
	at com.android.tools.r8.dex.a$a.a(SourceFile:28)
	at com.android.tools.r8.dex.a.a(SourceFile:76)
	at com.android.tools.r8.dex.a.a(SourceFile:23)
	at com.android.tools.r8.D8.a(D8.java:21)
	at com.android.tools.r8.D8.d(D8.java:11)
	at com.android.tools.r8.D8.b(D8.java:1)
	at com.android.tools.r8.utils.w.a(SourceFile:24)
	... 43 more
	Suppressed: java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.android.tools.r8.utils.w$c: java.lang.IllegalArgumentException: Unsupported class file major version 61
		at com.android.tools.r8.dex.a.a(SourceFile:96)
		... 48 more
	Caused by: java.util.concurrent.ExecutionException: com.android.tools.r8.utils.w$c: java.lang.IllegalArgumentException: Unsupported class file major version 61
		at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:566)
		at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:527)
		at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:88)
		at com.android.tools.r8.utils.V.a(SourceFile:50)
		at com.android.tools.r8.dex.a.a(SourceFile:79)
		... 48 more
	Caused by: com.android.tools.r8.utils.w$c: java.lang.IllegalArgumentException: Unsupported class file major version 61
		at com.android.tools.r8.utils.w$c.a(SourceFile:6)
		at com.android.tools.r8.utils.w.a(SourceFile:97)
		at com.android.tools.r8.graph.B0.b(SourceFile:2)
		at com.android.tools.r8.dex.a$a.a(SourceFile:15)
		at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
		at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
		at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
		at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:321)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
		at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:66)
		at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:36)
		at com.android.tools.r8.dex.a$a.a(SourceFile:12)
		at com.android.tools.r8.dex.a$a.a(SourceFile:28)
		at com.android.tools.r8.dex.a.a(SourceFile:76)
		... 48 more
	Caused by: [CIRCULAR REFERENCE: java.lang.IllegalArgumentException: Unsupported class file major version 61]

@kizitonwose
Copy link
Owner

Hi, thanks for reporting this. Kindly let me know how to reproduce this as there is not much I can do with the limited information provided.

@JoeVX
Copy link

JoeVX commented Sep 9, 2023

jdk version mismatch, change Java_17 to your Java version

@JoeVX
Copy link

JoeVX commented Sep 11, 2023

Hi, thanks for reporting this. Kindly let me know how to reproduce this as there is not much I can do with the limited information provided.

this issue can be closed now. jdk version mismatch, change Java_17 to your Java version

@DanteAndroid
Copy link
Author

Hi, thanks for reporting this. Kindly let me know how to reproduce this as there is not much I can do with the limited information provided.

this issue can be closed now. jdk version mismatch, change Java_17 to your Java version

I got some issues when updated to jdk 17, so it would be nice if you could downgrade calendar to like jdk11

@DanteAndroid
Copy link
Author

Hi, thanks for reporting this. Kindly let me know how to reproduce this as there is not much I can do with the limited information provided.

Your project is built under jdk 17, thats why I got this problem. Please consider downgrade to support more jdk versions :)

@kizitonwose
Copy link
Owner

There are no plans to downgrade the jdk version in the library, unfortunately. Sorry for the inconvenience.

@DanteAndroid
Copy link
Author

Any workaround for this issue? Thanks

@kizitonwose
Copy link
Owner

None that I know. But maybe some Googling might help.

@AhmadAyyaz1993
Copy link

There are no plans to downgrade the jdk version in the library, unfortunately. Sorry for the inconvenience.

Hi @kizitonwose I am getting the same error in my project after upgrading the library to 2.x.x. Can you please provide us the proper resolution?

@kizitonwose
Copy link
Owner

@AhmadAyyaz1993 As I wrote here, I cannot reproduce this jdk version mismatch issue using the sample project. If anyone in this thread would be kind enough to provide me with a working sample project where I can reproduce this issue, I would be happy to take a look.

However, the way I see it, sooner or later most projects will be on JDK 17, so I am not even sure I want to spend a lot of time on this issue (still very happy to take a look). If you have a version that currently works in your project then stick with it until the project is ready to migrate to JDK 17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants