3

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

aloj
  • 3,194
  • 7
  • 27
  • 38

1 Answers1

4

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

aloj
  • 3,194
  • 7
  • 27
  • 38
  • 1
    I get a '[daemon] OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=permit; support was removed in 17.0' – phreed Feb 17 '22 at 00:39