转换为 Dalvik 格式失败:无法执行 dex:Java 堆空间 [英] Conversion to Dalvik format failed: Unable to execute dex: Java heap space
问题描述
我在我的 Android eclipse 项目中添加了一个 2.45mb jar 文件,现在无论我做什么,我都会继续收到转换为 Dalvik 格式失败:无法执行 dex:Java 堆空间".
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.
我在网上进行了研究,并被告知更新我的 eclipse.ini 以增加我的 Java VM 堆大小.我已对 eclipse.ini 中的所有值执行此操作,但仍然出现构建错误.
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.
有什么想法吗?
推荐答案
修改 eclipse.ini
中的 -XmsAm
和 -XmxBm
参数以便它们足够大.默认为 -Xms40m
-Xmx384m
.尝试将它们都更改为 -Xms512m
-Xmx512m
并重新启动 eclipse 以查看是否有帮助.如果没有,继续增加值并重新启动 eclipse,直到发生以下两种情况之一:
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:
- 您的构建已完成.
- Eclipse 不会重新启动,因为您没有足够的内存.
eclipse.ini
位于 Ubuntu 中的 /etc/eclipse.ini
(假设您从 Ubuntu 存储库安装了 Eclipse).
eclipse.ini
is located at /etc/eclipse.ini
in Ubuntu (assuming you installed Eclipse from the Ubuntu repositories).
对于 MAC,请参阅:
For MAC please see:
找到 eclipse.ini 有点棘手.要找到它,请右键单击 Eclipse 应用程序图标并选择显示包内容",然后双击内容"文件夹,然后双击MacOS"文件夹,即 eclipse.ini 的主目录>
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屋!