Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error 'ionic run Android' on device

So, I'm simply trying to run my app on a plugged in HTC Desire. The steps I've taken are: enabling debugging in the manifest xml, enabled usb debugging on the device itself, and created the AVD with a custom definition in the android AVD manager.

The errors I'm getting after running ionic run android --info

"Could not create the Java Virtual Machine"
"Could not reserve enough space for object heap", as well as the warning "No target specified, deploying device [random device number that i have no clue where it's coming from]"

Here's an image of my command window: enter image description here

Any ideas why i might have this warning and error messages? Are they related issues? or are they two seperate issues?

like image 846
Alexsandra Guerra Avatar asked May 20 '15 07:05

Alexsandra Guerra


2 Answers

This worked for me

Go to Start->Control Panel->System->Advanced(tab)->Environment Variables->System Variables->New:

Variable name: _JAVA_OPTIONS

Variable value: -Xmx512M

like image 146
1nteger Avatar answered Oct 21 '22 18:10

1nteger


Add _JAVA_OPTIONS to your Environment Variables with the value -Xms512M

Environment

like image 3
Federico Aineseder Avatar answered Oct 21 '22 18:10

Federico Aineseder