0

After installed of new Windows and Andriod Studio,the existing project cannot run now. Please help!

The error message is as below.

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/6.1.1/userguide/gradle_daemon.html Process command line: C:\Users\samkong.jdks\corretto-1.8.0_322\bin\java.exe --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED -Xmx2048m--add-exports=java.base/sun.nio.ch=ALL-UNNAMED -Dfile.encoding=x-windows-950 -Duser.country=HK -Duser.language=zh -Duser.variant -cp D:\Android\DeliveryApp api level24\wrapper\dists\gradle-6.1.1-all\cfmwm155h49vnt3hynmlrsdst\gradle-6.1.1\lib\gradle-launcher-6.1.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.1.1 Please read the following process output to find out more: ----------------------- Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. Unrecognized option: --add-opens=java.base/java.io=ALL-UNNAMED

----------------------- Check the JVM arguments defined for the gradle process in:

  • gradle.properties in project root directory
  • Maybe this could Help you https://stackoverflow.com/questions/25009717/android-studio-gradle-project-unable-to-start-the-daemon-process-initializatio – Hamed Heidari Feb 01 '22 at 07:23
  • The error message says it's failing to start gradle (the project builder) because it's failing to start the JVM, in turn because the JVM doesn't like the option: `--add-opens=java.base/java.io=ALL-UNNAMED` that's in the `gradle.properties` file in project root directory. Perhaps it's trying to run an old JVM that predates the `--add-opens` option, in which case it'd help to update the JVM or to point gradle to the right JVM among the installed JVMs. – Jerry101 Feb 01 '22 at 07:28
  • I think `--add-opens` is a Java 9 feature (i.e. JDK 1.9), while the error message you got implies it's trying to run JDK 1.8.0. – Jerry101 Feb 01 '22 at 07:36

0 Answers0