1

I tried almost all tricks but cannot fix this problem please anyone help

ERROR: 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/5.4.1/userguide/gradle_daemon.html Process command line: C:\Program Files\Android\Android Studio\jre\bin\java.exe -Xmx1024m -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\dell.gradle\wrapper\dists\gradle-5.4.1-all\3221gyojl5jsh0helicew7rwx\gradle-5.4.1\lib\gradle-launcher-5.4.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 5.4.1 Please read the following process output to find out more:


SJN
  • 377
  • 2
  • 8
  • 18
ajay
  • 11
  • 1
  • 3
  • Is it the same as https://stackoverflow.com/questions/25009717/android-studio-gradle-project-unable-to-start-the-daemon-process-initializatio ? – Kishita Variya Nov 08 '19 at 10:39

4 Answers4

2

Open gradle.properties after scrolling down. Copy the following text and try building the program.

org.gradle.jvmargs=-Xmx1024m -XX\:MaxPermSize\=512m
David Buck
  • 3,752
  • 35
  • 31
  • 35
1

Try this solution Open gradle.properties and add this line

org.gradle.jvmargs=-Xmx1024m -XX\:MaxPermSize\=512m

If this didn't solve your problem just go under C:\Users\<username> and delete .gradle directory then try building again.

Amine
  • 2,241
  • 2
  • 19
  • 41
  • when i disabled my antivirus software and try to sync it worked!! but everytime i should disable antivirus when syncing. Is there any way out? – ajay Nov 09 '19 at 03:56
  • Well can you try with your Antivirus activated but change this , go to `File > Settings > Build, Execution, Deployment > Gradle` and check offline work and use local gradle distribution. PS: Accept the answer if it solves your problem :) – Amine Nov 09 '19 at 09:07
1

I changed gradle.properties and it helped to solve same error, but after reload I am back to square ONE.

Unsupported Modules Detected: Compilation is not supported for following modules: capacitor-cordova-android-plugins. Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project.

thank you

0

in my case I had to remove the value "-XX:MaxPermSize=2048m" in:

org.gradle.jvmargs=-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError

In the file gradle.properties.

I run Intellij with openjdk-17.0.2

After that, It works Ok,

Pablo Ezequiel Inchausti
  • 16,623
  • 7
  • 28
  • 42