Nusrath Sultana
Nusrath Sultana

Reputation: 1

How to resolve this issue in windows 10?

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

Answers (2)

cowang
cowang

Reputation: 309

My problem with this disappeared when I upgraded to Gradle 7.4.

Upvotes: 0

Monik
Monik

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

Related Questions