I am trying to run my old android project in android studio i have updated my gradle version however I am getting the following error:
**Execution failed for task ‘:processDebugManifest’.
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 @13d72a22**
Gradle version: 7.2 JDK version: 17
I have tried gradle property value:
org.gradle.jvmargs = -Xmx2048M -Dkotlin.daemon.jvm.options="-Xmx2048M" –add-exports=java.base/sun.nio.ch=ALL-UNNAMED –add-opens=java.base/java.lang=ALL-UNNAMED –add-opens=java.base/java.lang.reflect=ALL-UNNAMED –add-opens=java.base/java.io=ALL-UNNAMED –add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED
2
Answers
I just download JDK 11 and it's compatibale with AGP 7.2 and it's working
check Compatibility for AGL
https://developer.android.com/build/releases/past-releases/agp-7-2-0-release-notes
Solution:
Add the below line in your gradle.properties