转换到的Dalvik格式失败:无法执行DEX:Java堆空间 [英] Conversion to Dalvik format failed: Unable to execute dex: Java heap space
问题描述
我添加了一个 2.45MB jar文件到我的Android的Eclipse项目,现在我继续得到转换为的Dalvik格式失败:无法执行DEX:Java堆空间不管我做什么。
我已经在网上进行搜索,并获悉更新我的eclipse.ini增加我的Java虚拟机heapsizes。我曾在的eclipse.ini所有的值来实现这一点,我继续得到生成错误。
任何想法?
修改 -XmsAm
和 -XmxBm
在的eclipse.ini
paremeters,使它们足够大。默认值为 -Xms40m
-Xmx384m
。试着他们两个更改为 -Xms512m
-Xmx512m
并重新启动Eclipse来看看是否有帮助。如果没有,继续增加值,并重新启动Eclipse,直到两件事情之一发生:
- 您构建完成。
- 在Eclipse将不会重启,因为你没有足够的内存。
的eclipse.ini
位于 /etc/eclipse.ini
在Ubuntu(假设你从安装了Eclipse Ubuntu的软件库)。
有关MAC请参见:
查找的eclipse.ini是一丁点棘手。为了找到它,Eclipse的应用程序图标上单击右键,选择显示包内容,然后在目录文件夹,双击,然后在MacOS的文件夹,双击,中的eclipse.ini 家P>
<一个href="https://confluence.sakaiproject.org/pages/viewpage.action?pageId=61341742">https://confluence.sakaiproject.org/pages/viewpage.action?pageId=61341742
I have added a 2.45mb jar file to my Android eclipse project and now I continue to get "Conversion to Dalvik format failed: Unable to execute dex: Java heap space" no matter what I do.
I have researched online, and was informed to update my eclipse.ini to increase my Java VM heapsizes. I have done this for all the values in eclipse.ini and I continue to get the build error.
Any ideas?
Modify the -XmsAm
and -XmxBm
paremeters in eclipse.ini
so that they are large enough. The default is -Xms40m
-Xmx384m
. Try changing them both to -Xms512m
-Xmx512m
and restart eclipse to see if that helps. If not, continue to increase the values and restart eclipse until either one of two things happens:
- Your build completes.
- Eclipse won't restart because you don't have enough memory.
eclipse.ini
is located at /etc/eclipse.ini
in Ubuntu (assuming you installed Eclipse from the Ubuntu repositories).
For MAC please see:
Finding eclipse.ini is a wee bit tricky. To locate it, right-click on the Eclipse Application icon and select "Show Package Contents", then double-click on the "Contents" folder and then double-click on the "MacOS" folder, the home of eclipse.ini
https://confluence.sakaiproject.org/pages/viewpage.action?pageId=61341742
这篇关于转换到的Dalvik格式失败:无法执行DEX:Java堆空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!