I try to build my gradle project and I get the following error:
1:36 PM Gradle sync failed: Unable to make field private static final java.util.Map java.lang.ProcessEnvironment.theCaseInsensitiveEnvironment accessible: module java.base does not "opens java.lang" to unnamed module @7d417077 (5 s 556 ms)
build.gradle file
and no, I do not know gradle and no I am not planning on learning it, but I have no chioce. Thanks in advance
I've had a similar problem with an old BungeeCord plugin, which used Gradle 4.10. In my case - it seems like that old Gradle doesn't work properly with Java 16, so I've manually changed contents of gradle/wrapper/gradle-wrapper.properties file to use Gradle 7.0.
Old file:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-bin.zip
New file:
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
Now it works ok, no more Gradle errors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With