简体   繁体   中英

Ionic - Build Failed - Unable to start the daemon process

I created an app with Ionic but when trying to build it I get this error:

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 guide chapter on the daemon at https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html

    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.

Error: cmd: Command failed with exit code 1 Error output: 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 guide chapter on the daemon at https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html

    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.

What is it that I am doing wrong? How can I change those settings?

Just for anyone who has been having this same problem. I encountered it too and solved it the following way.

I changed the argument

'org.gradle.jvmargs': '-Xmx2048m',

to:

'org.gradle.jvmargs': '-Xmx1024m',

in the constructor of GradlePropertiesParser class. This can be find on line 37 of GradlePropertiesParser.js at:

platforms/android/cordova/lib/config

The result was successful for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM