Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.lang.NoClassDefFoundError: Could not initialize class org.jetbrains.kotlin.com.intellij.pom.java.LanguageLevel

I'm trying to execute an Android project but I'm getting this error. I'm running on Mac with M1, JDK 11.0.11 and kotlin 1.4.21.

> Task :common:kaptGenerateStubsAppDebugKotlin FAILED
e: java.lang.NoClassDefFoundError: Could not initialize class org.jetbrains.kotlin.com.intellij.pom.java.LanguageLevel

Here is the full log https://pastebin.com/kzHuad70

like image 469
aloj Avatar asked Oct 19 '25 08:10

aloj


1 Answers

It was fixed by adding

org.gradle.jvmargs=-Dkotlin.daemon.jvm.options=--illegal-access=permit

to the gradle.properties file, after that I encounter a new error saying

Caused by: java.lang.Exception: No native library is found for os.name=Mac and 
os.arch=aarch64. path=/org/sqlite/native/Mac/aarch64 

and it was fixed by adding kapt "org.xerial:sqlite-jdbc:3.34.0" as depency

like image 69
aloj Avatar answered Oct 20 '25 22:10

aloj



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!