How can I solve this problem of getting execution failure?

Execution failed for task ‘:app:compileDebugJavaWithJavac’.

java.lang.IllegalAccessError: class (in unnamed module @0x16b68a6a) cannot access class$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export to unnamed module @0x16b68a6a

Hei, have you solved this issue?

Take a look at:

TL;DR: you are probably using an old gradle version with a new JDK.