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.
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
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.
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
I alredy tried http://stackoverflow.com/questions/42157558/unable-to-start-the-daemon-process-cordova
but not working
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.
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