Error 'ionic run Android' on device

2019-02-04 23:39发布

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条回答
成全新的幸福
2楼-- · 2019-02-05 00:17

Add _JAVA_OPTIONS to your Environment Variables with the value -Xms512M

Environment

查看更多
Luminary・发光体
3楼-- · 2019-02-05 00:22

This worked for me

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

Variable name: _JAVA_OPTIONS

Variable value: -Xmx512M

查看更多
乱世女痞
4楼-- · 2019-02-05 00:39

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

查看更多
登录 后发表回答