I am trying to install flutter to my new computer. Everything seems fine in flutter doctor but when i run my app I get an error.
Execution failed for task ':app:compileDebugJavaWithJavac'.
> java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x16545f8f) 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 @0x16545f8f
How can i fix this . Please help