run-track
run-track copied to clipboard
this error occurs while i run this code in android studio, even i switch java 11 it still shows this , how to solve this ?
java.lang.IllegalAccessError: superclass access check failed: class org.jetbrains.kotlin.kapt3.base.javac.KaptJavaCompiler (in unnamed module @0x15188ce6) cannot access class com.sun.tools.javac.main.JavaCompiler (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.main to unnamed module @0x15188ce6
Make the Gradle Java version (File> Settings > Build, Execution, Deployment > Build Tools > Gradle) to Java 17 or Lower (Java 11 and build it. Let me know if you face any issues.
I have the same issue. Using openjdk 17.0.14 gives the same result as before.
java.lang.IllegalAccessError: superclass access check failed: class org.jetbrains.kotlin.kapt3.base.javac.KaptJavaCompiler (in unnamed module @0x205f6259) cannot access class com.sun.tools.javac.main.JavaCompiler (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.main to unnamed module @0x205f6259
When I try Java 11.0.27, I get
Gradle JVM version incompatible.
This project is configured to use an older Gradle JVM that supports up to version 11 but the current AGP requires a Gradle JVM that supports version 17.