Skip to content

Commit 52da00e

Browse files
Fixed: Fix gradle build error if using jdk 17
`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`
1 parent b0e1dbc commit 52da00e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

gradle.properties

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@
1212
# This option should only be used with decoupled projects. More details, visit
1313
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1414
# org.gradle.parallel=true
15-
org.gradle.jvmargs=-Xmx2048M
15+
org.gradle.jvmargs=-Xmx2048M \
16+
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
17+
--add-opens=java.base/java.lang=ALL-UNNAMED \
18+
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
19+
--add-opens=java.base/java.io=ALL-UNNAMED \
20+
--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED
1621
android.useAndroidX=true
1722

1823
minSdkVersion=21

0 commit comments

Comments
 (0)