Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @786f3609
Question posted in Android Studio
The official documentation can be found here.
The official documentation can be found here.
2
Answers
Choose JDK Location to lower than Java 16, as it is not supported in Android studio as of now.
Adding
--add-opens=java.base/java.io=ALL-UNNAMED
to yourJAVA_OPTS
environment variable or theorg.gradle.jvmargs
gradle property will resolve this issue with Java 18.Here is the full
org.gradle.jvmargs
gradle property value that I’m using: