安卓解决:Unable to make field private final java.lang.String java.io.File.path accessible: module java.b

解决: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 @2dbb28f7

The solution is to add configuration after org.gradle.jvmargs in gradle.properties:

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

Guess you like

Origin blog.csdn.net/weixin_39114763/article/details/133152483