'Unable to start daemon process - Android Studio
I opened a project in Android Studio today, and gradle showed the error below.
Then I tried to create a new project, but it still showed the same error.
It had no problem a few days ago, but it suddenly can not work today.
However, it works fine on another Windows account.
This is the error message :
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.2/userguide/gradle_daemon.html
Process command line: C:\Program Files\Android\Android Studio\jre\bin\java.exe --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 -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country=TW -Duser.language=zh -Duser.variant -cp C:\Users\鄭傑仁\.gradle\wrapper\dists\gradle-7.2-bin\2dnblmf4td7x66yl1d74lt32g\gradle-7.2\lib\gradle-launcher-7.2.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 7.2
Please read the following process output to find out more:
-----------------------
�隤�: �銝��瘜�銝餉�� org.gradle.launcher.daemon.bootstrap.GradleDaemon
����: java.lang.ClassNotFoundException: org.gradle.launcher.daemon.bootstrap.GradleDaemon
-----------------------
Check the JVM arguments defined for the gradle process in:
- gradle.properties in project root directory
This is gradle.properties
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
android.useAndroidX=true
kotlin.code.style=official
android.nonTransitiveRClass=true
Here are what I had tried :
- change
org.gradle.jvmargs=-Xmx2048mto other values, such as 1024m or 512m - run Android Studio with administrator
- delete MyApplication/gradle and sync again
- delete C:/User/UserName/gradle and restart Android Studio
- reinstall Android Studio
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
