jdk版本1.8,gradle版本8.5
详细错误如下:
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.For more details on the daemon, please refer to https://docs.gradle.org/8.5/userguide/gradle_daemon.html in the Gradle documentation.
Process command line: D:\Program Files\Java\bin\java.exe --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=64076 -Xms128m -Xmx512m -Dfile.encoding=GBK -Duser.country=CN -Duser.language=zh -Duser.variant -cp D:\gradle\gradle-8.5-bin\gradle-8.5\lib\gradle-launcher-8.5.jar -javaagent:D:\gradle\gradle-8.5-bin\gradle-8.5\lib\agents\gradle-instrumentation-agent-8.5.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.5
Please read the following process output to find out more:
-----------------------
Unrecognized option: --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
-----------------------
Check the JVM arguments defined for the gradle process in:
- gradle.properties in project root directory
原因是--add-opens命令在jdk1.8中不存在导致无法执行这个命令,将jdk版本升级到11后解决