magnumrocha
09/17/2021, 3:50 PMjava.lang.IllegalAccessError: class org.jetbrains.kotlin.kapt3.base.KaptContext (in unnamed module @0x50148e28) cannot access class com.sun.tools.javac.util.Context (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module @0x50148e28
I am having this after update gradle to version 7.2…Zac Sweers
09/17/2021, 4:07 PMmagnumrocha
09/17/2021, 4:08 PMZac Sweers
09/17/2021, 4:10 PMmagnumrocha
09/17/2021, 4:23 PMgradle.properties
:
android.debug.obsoleteApi=true
#Enable daemon
org.gradle.daemon=true
# Try and findout the best heap size for your project build.
org.gradle.jvmargs=-Xmx3096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# Modularise your project and enable parallel build
org.gradle.parallel=true
# Enable configure on demand.
org.gradle.configureondemand=true
android.useAndroidX=true
android.enableJetifier=true
Zac Sweers
09/17/2021, 5:07 PMmagnumrocha
09/17/2021, 5:11 PMZac Sweers
09/17/2021, 5:17 PMProbe
09/26/2021, 2:53 PM./gradlew compileTestJava
> Task :kaptGenerateStubsKotlin FAILED
e: java.lang.IllegalAccessError: class org.jetbrains.kotlin.kapt3.base.KaptContext (in unnamed module @0x3999ecf1) cannot access class com.sun.tools.javac.util.Context (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module @0x3999ecf1
Zac Sweers
09/26/2021, 5:18 PMProbe
09/26/2021, 8:55 PMZac Sweers
09/26/2021, 8:56 PM--add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
is not the correct format, you need to use =
--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
Probe
09/26/2021, 9:00 PMZac Sweers
09/26/2021, 9:20 PM