使用“ant debug”构建项目时出现以下错误。 这是小快照:
-dex: [echo] Converting compiled files and external libraries into C:\ELOQUENCE\b in\classes.dex... [apply] Could not create the Java virtual machine. [apply] Error occurred during initialization of VM [apply] Could not reserve enough space for object heap BUILD FAILED H:\USE\android-sdk-windows\tools\ant\ant_rules_r3.xml:361: The following error o ccurred while executing this line: H:\USE\android-sdk-windows\tools\ant\ant_rules_r3.xml:174: apply returned: 1
请告诉我可以做什么?
谢谢!
最佳答案
尝试减少文件中最大堆空间设置的设置
android-sdk-windows\platform-tools\dx.bat
到较小的值。我不得不将其更改为 512M 而不是 1024M。
set defaultMx=-Xmx512M
关于ANDROID-编译错误(没有初始化JVM),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4314085/