2012-06-26 71 views
3

当我包含超过5个罐子时,由于堆内存的原因,eclipse在编译时停止工作。android java堆空间

An internal error occurred during: "Activity Monitor Job". 
Java heap space 
Unable to execute dex : java heap space 

我的电脑有2GB内存和的eclipse.ini是如下

-startup 
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar 
--launcher.library 
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502 
-showsplash 
org.eclipse.platform 
-vm 
C:/Program Files/Java/jdk1.7.0/bin/javaw.exe 
--launcher.XXMaxPermSize 
512m 
--launcher.defaultAction 
openFile 
-vmargs 
-Dosgi.requiredJavaVersion=1.5 
-Xms256m 
-Xmx700m 

我试图把罐子上图书馆Eclipse的构建路径设置。但它给了我VerifyError。

我是否需要增加RAM内存?

+0

[这](http://stackoverflow.com/questions/5943712/conversion-to-dalvik-format-failed-unable-to-execute-dex -java-heap-space)的帖子可能会有所帮助。 – Jeshurun

+0

你能解决这个问题吗? – Michael

回答

3

您可以尝试通过将-Xmx700m的值更改为更大的值来增加eclipse所允许的最大堆空间。 Eclipse ini中的此设置目前将JVM限制为700MB。我不确定要告诉你分配的金额。但是,通过反复试验,您应该能够找到适合您的号码。

+0

你可以详细说明如何在哪里做这种更新,考虑noobs和帮助 –