9

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?

3
  • Are you using a 32bit JDK on Windows 64bit? See here: stackoverflow.com/questions/25950241/…
    – LarsBauer
    May 20, 2015 at 8:46
  • I thought that I had already check that as an optional solution, but I double-checked and realized that my path variable was referring to the old version of jdk/jre (32 bit). After fixing that, and re-building the ionic app so that the changes were fully implemented in the new build, it runs on the device just fine! Thanks for your help @QueryLars May 21, 2015 at 6:56
  • To guys looking for solving this issue, this helped me - stackoverflow.com/a/34636929/3748701 Jan 6, 2016 at 15:41

3 Answers 3

30

This worked for me

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

Variable name: _JAVA_OPTIONS

Variable value: -Xmx512M

1
  • Works in windows too, adding the same variable in environment, thx for help Nov 25, 2016 at 18:26
3

Add _JAVA_OPTIONS to your Environment Variables with the value -Xms512M

Environment

0

Try deleting your .gradle from C:\Users\ directory and try again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.