Ionic-framework: bug: ionic 2 unable to start daemon process.

Created on 29 Mar 2017  路  6Comments  路  Source: ionic-team/ionic-framework

Type: bug

Ionic Version: 2.x

Platform: desktop browser

i can able to do ionic serve.
but i was unable to run the command " ionic run android"
i setup everything was correct.
If i develop though android studio means problem will not occur.

my command prompt result bellow. Please give me solution.
D:\KUMARPRO\Android_PRO\technews>ionic run android --info

ionic-hello-world@ ionic:build D:\KUMARPRO\Android_PRO\technews
ionic-app-scripts build "--info"

[22:27:14] ionic-app-scripts 1.1.4
[22:27:14] build dev started ...
[22:27:14] clean started ...
[22:27:14] clean finished in 4 ms
[22:27:14] copy started ...
[22:27:14] transpile started ...
[22:27:19] transpile finished in 4.78 s
[22:27:19] preprocess started ...
[22:27:19] preprocess finished in 1 ms
[22:27:19] webpack started ...
[22:27:19] copy finished in 5.08 s
[22:27:30] webpack finished in 11.70 s
[22:27:30] sass started ...
[22:27:32] sass finished in 1.15 s
[22:27:32] postprocess started ...
[22:27:32] postprocess finished in 2 ms
[22:27:32] lint started ...
[22:27:32] build dev finished in 17.69 s
[22:27:35] lint finished in 3.68 s
ANDROID_HOME=C:\Android
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_11

Subproject Path: CordovaLib

Starting a new Gradle Daemon for this build (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 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.

Most helpful comment

http://stackoverflow.com/questions/30342629/error-ionic-run-android-on-device
this worked
Go to Start->Control Panel->System->Advanced(tab)->Environment Variables->System Variables->New:
Variable name: _JAVA_OPTIONS

Variable value: -Xmx512M

All 6 comments

http://stackoverflow.com/questions/30342629/error-ionic-run-android-on-device
this worked
Go to Start->Control Panel->System->Advanced(tab)->Environment Variables->System Variables->New:
Variable name: _JAVA_OPTIONS

Variable value: -Xmx512M

http://stackoverflow.com/questions/30342629/error-ionic-run-android-on-device
this worked
Go to Start->Control Panel->System->Advanced(tab)->Environment Variables->System Variables->New:
Variable name: _JAVA_OPTIONS

Variable value: -Xmx512M
Its working for me also

What about OSX? any solution?

Wow, correct guys. after I have searched for weeks and many recommendations had failed
http://stackoverflow.com/questions/30342629/error-ionic-run-android-on-device

worked like miracle.

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daveshirman picture daveshirman  路  3Comments

vswarte picture vswarte  路  3Comments

alan-agius4 picture alan-agius4  路  3Comments

SebastianGiro picture SebastianGiro  路  3Comments

fdnhkj picture fdnhkj  路  3Comments