aloj
aloj

Reputation: 3284

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

Upvotes: 4

Views: 7095

Answers (1)

aloj
aloj

Reputation: 3284

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

Upvotes: 5

Related Questions