Build Failed Unable start the daemon process


Greetings i have this error when i trying run ionic run android

    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
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


Change argument -Xmx20484m to 1024 at line:
args.push(’-Dorg.gradle.jvmargs=-Xmx1024m’); in your project file platforms\android\cordova\lib\builders\GradleBuilder.js.
It’s work for me


It was -Xmx2048m

BTW change it from -Xmx2048m to -Xmx1024m worked!


Chokran a khay TALBI al 3azzzzzzzzzzz


Thanks. I had the same gradle problem too but the above solution worked for me. Thanks.


Thank you it worked (’-Dorg.gradle.jvmargs=-Xmx1024m’);


Thankyou So much TALB you are great TAMARO KHUB KHUB AABHAR(in gujarati language)