您的位置:首页 > 编程语言 > Java开发

"Could not create the Java Virtual Machine" when used Ant package

2015-02-03 14:43 627 查看
The error message:

-dex:

[dex] input: I:\companywork\GamePlay\samples\game-sanguo\android\bin\class

es

[dex] input: J:\android\android-sdk-windows\tools\support\annotations.jar

[dex] Pre-Dexing J:\android\android-sdk-windows\tools\support\annotations.

jar -> annotations-31e2db6e0f9d274026a19c8df80cad9a.jar

[dx] Error occurred during initialization of VM

[dx] Could not reserve enough space for object heap

[dx] Error: Could not create the Java Virtual Machine.

[dx] Error: A fatal exception has occurred. Program will exit.

到你的androidSDK目录下 android-sdk-windows\build-tools 找到对应版本的编译工具 我用的是21.1.2

进入目录找到 dx.bat -》 set defaultXmx=-Xmx512M 改小点比如512M
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: