0

I am trying to run

 gradle dependencyUpdates

and receiving the following error :

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the User Manual chapter on the daemon at https://docs.gradle.org/7.5.1/userguide/gradle_daemon.html
Process command line: /opt/homebrew/Cellar/openjdk@17/17.0.4.1_1/libexec/openjdk.jdk/Contents/Home/bin/java -XX:MaxPermSize=2048m --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xmx6g -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /opt/homebrew/Cellar/gradle/7.5.1_1/libexec/lib/gradle-launcher-7.5.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 7.5.1
Please read the following process output to find out more:
-----------------------
Unrecognized VM option 'MaxPermSize=2048m'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

I tried updating the command to

gradle dependencyUpdates -XX:+IgnoreUnrecognizedVMOptions

and

gradle dependencyUpdates -XX:MaxPermSize=2048m
gradle --version

------------------------------------------------------------
Gradle 7.5.1


java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)

but I am still getting the same error.

How can I resolve the error.

Tanu
  • 1,286
  • 4
  • 16
  • 35
  • not sure if that the issue or not but your gradle configured to run with jdk 17 while you have jdk 11 so from your intellij idea go to file -> settings -> build,execution -> build tool -> gradle and check the gradle JVM setting there make sure it point to jdk 11 –  Jan 13 '23 at 19:52
  • it is pointing to jdk11 @justsomeone Thanks – Tanu Jan 13 '23 at 21:31
  • according to those it mentioned that MaxPermSize=2048m is removed after jdk 8 https://stackoverflow.com/questions/69528380/unrecognized-vm-option-maxpermsize-2048m https://stackoverflow.com/questions/31411989/android-studio-unrecognized-vm-option-maxpermsize-256m –  Jan 14 '23 at 10:10

0 Answers0