Reputation: 1
Execution failed for task ':app:compileDebugJavaWithJavac'.
java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x16b68a6a) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x16b68a6a
I am continuously facing this problem. I've updated my jdk recently. Now I'm using jdk 17 and also updated gradle with 7.2 version.
Upvotes: 0
Views: 480
Reputation: 321
Try using jdk 14 or 16. JDK 17 is comparatively new and I don't think many software support it yet.
Upvotes: 0