I know this question is already frequently asked. But I tried several solutions, and I'm still 'Unable to start the daemon process'... Thanks in advance for your help.
What I've done:
- add a new system variable name : _JAVA_OPTIONS and value : -Xmx512M (Ionic Android Build failed : Unable to start the daemon process)
- Changed within gradle.properties to org.gradle.jvmargs=-Xmx1024m, and delete the .gradle folder (Gradle Daemon Android Studio: "Unable to start the daemon process")
- Removed and add android (Ionic Android Build Error: cmd: Command failed with exit code 1 [solution])
- Also, put off my firewalls for a moment. And also didn't work.
Versions:
java version "1.8.0_241"
Ionic: CLI 4.12.0
Gradle 6.3
Cordova: 9.0.0 (cordova-lib@9.0.1)
Lines within the CMD:
cordova run android Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=C:\Users\jimmy\AppData\Local\Android\Sdk (recommended setting) ANDROID_HOME=C:\Users\jimmy\AppData\Local\Android\Sdk (DEPRECATED) 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/6.3/userguide/gradle_daemon.html Process command line: C:\Program Files (x86)\Java\jdk1.8.0_241\bin\java.exe -Xmx2048m -Dfile.encoding=windows-1252 -Duser.country=NL -Duser.language=nl -Duser.variant -cp C:\Gradle\gradle-6.3\lib\gradle-launcher-6.3.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.3 Please read the following process output to find out more
Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org C:\Gradle\gradle-6.3\bin\gradle: Command failed with exit code 1 [ERROR] An error occurred while running subprocess cordova.
cordova run android exited with exit code 1. Re-running this command with the --verbose flag may provide more information.