hanggrian / socialview

Android TextView and EditText with hashtag, mention, and hyperlink support
https://hendraanggrian.github.io/socialview/
Apache License 2.0
322 stars 81 forks source link

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

Open saadkhalidkhan opened 10 months ago

saadkhalidkhan commented 10 months ago

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

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

Yes I tried with that but the problem persists.

hanggrian commented 10 months ago

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

saadkhalidkhan commented 10 months ago

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

hanggrian commented 10 months ago

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

Still facing the same issue

hanggrian commented 10 months ago

Post your build scripts if it still fails.

saadkhalidkhan commented 10 months ago

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

saadkhalidkhan commented 10 months ago

Can you please update me on this?

hanggrian commented 10 months ago

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
}