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

1 Like

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)

It Was Not workfor me please help

ionic (Ionic CLI) : 4.11.0 (C:\Users\mr\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.1.0
@angular-devkit/build-angular : 0.13.5
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.5
@ionic/angular-toolkit : 1.4.0


cordova (Cordova CLI) : not installed
Cordova Platforms : android 7.1.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 5 other plugins)


NodeJS : v11.8.0 (C:\Program Files\nodejs\node.exe)
npm : 6.5.0
OS : Windows 10

How to solve these issue