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 jetified-socialview-0.1-runtime.jar #132

Open
saadkhalidkhan opened this issue Aug 24, 2023 · 10 comments
Open

Unsupported Class jetified-socialview-0.1-runtime.jar #132

saadkhalidkhan opened this issue Aug 24, 2023 · 10 comments

Comments

@saadkhalidkhan
Copy link

Hi,

I changed my laptop and this library is not working, I am trying to reosolve this since last two days but unable to resolve it. Please help me on that.

Error:

AGPBI: {"kind":"error","text":"java.lang.IllegalArgumentException: Unsupported class file major version 61","sources":[{"file":"C:\\Users\\ranas\\.gradle\\caches\\transforms-3\\c1e2b2487ebebd69520897cd113fafc0\\transformed\\jetified-socialview-0.1-runtime.jar"}],"tool":"D8"}

jetified-socialview-0.1-runtime.jar

When I remove this library everything works fine. Please guide me. Thank you
Screenshot 2023-08-24 223344

@hanggrian
Copy link
Owner

Thanks for pointing this out, I may have forgotten to use lower JDK when publishing this library.

Try the snapshot version 0.1-SNAPSHOT and see if the problem persists.

@saadkhalidkhan
Copy link
Author

Yes I tried with that but the problem persists.

@hanggrian
Copy link
Owner

I suppose a quick fix would be to use at least JDK 17, while I fix this issue.

@saadkhalidkhan
Copy link
Author

Understand, but tried with 11 and 17. None of them worked.

@hanggrian
Copy link
Owner

Try setting explicitly to JDK 17 in system environments, quit IDE, kill all java processes, then try again. I'm almost certain this is related to JDK 17.

@saadkhalidkhan
Copy link
Author

Still facing the same issue

@hanggrian
Copy link
Owner

  • Use the latest Android Gradle plugin 8.1.0.
  • Set Java toolchain to 17.
  • Make sure you use AndroidX and not deprecated Support libraries.
  • Have android.useAndroidX=true on your gradle.properties.

Post your build scripts if it still fails.

@saadkhalidkhan
Copy link
Author

image
This is the main cause where i am facing issue. I have updated all dependencies but still same persists.

@saadkhalidkhan
Copy link
Author

Can you please update me on this?

@hanggrian
Copy link
Owner

hanggrian commented Aug 26, 2023

That is not a buildscript. I mean your build.gradle files.

You need to set Java toolchain, check the link I sent you.

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(17)
    }
}

// or

kotlin {
    jvmToolchain 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

2 participants