kizitonwose / Calendar

A highly customizable calendar view and compose library for Android.
MIT License
4.5k stars 492 forks source link

Unsupported class file major version 61 when running #494

Closed DanteAndroid closed 2 weeks ago

DanteAndroid commented 10 months ago

Library information:

Describe the bug**

IDE got Unsupported class file major version 61 when running project

DanteAndroid commented 10 months ago
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 commented 9 months ago

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 commented 9 months ago

jdk version mismatch, change Java_17 to your Java version

JoeVX commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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

DanteAndroid commented 9 months ago

Any workaround for this issue? Thanks

kizitonwose commented 9 months ago

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

AhmadAyyaz1993 commented 8 months ago

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 commented 7 months ago

@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.

kizitonwose commented 2 weeks ago

Closing this for now as I still cannot reproduce it. As mentioned above, if someone is willing to provide a sample, I will take a look.