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 @7dacd56d

16-Jul-2024

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 @7dacd56d

Error:



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 @7dacd56d


Solution :

File->Settings -> Build, Execution, Deployment-> Build Tools -> Gradle
Change Gradle Jdk then set 1.8



After making these changes, sync your project with Gradle and rebuild it. This can be done by clicking on the "Sync Now" link in the bar that appears at the top of Android Studio when you modify the Gradle files.

Comments