日食与Android SDK,错误:Java堆空间 [英] eclipse with Android sdk, ERROR: Java heap space

查看:195
本文介绍了日食与Android SDK,错误:Java堆空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,最近我有一个问题,在我的应用程序工作在Eclipse,而下一个消息显示出来,同时处理XML文件:

So lately I'm having a problem while working in my apps inside eclipse the next message shows up while working with xml files:

ERROR: 'Java heap space'

我看过一个尝试eclipse.ini文件里增加:

I have read an try increasing inside the eclipse.ini file the:

-vmargs
-Xmx40m
-Xmx512m

-vmargs
-Xmx512m
-Xmx1024m 

但它会工作了一段时间后比和小时左右,它会给我同样的错误,我在一台MacBook Air 4GB内存的工作。 我有 是Eclipse SDK 版本:3.7.2 建立ID:M20120208-0800 我刚刚更新了,所以我不知道这是为什么演戏了这种方式,这是怎么了我的eclipse.ini看起来现在:

but it will work for a while than after and hour or so it will give me the same error, I'm working in a MacBook air with 4gb ram. I have Eclipse SDK Version: 3.7.2 Build id: M20120208-0800 and I just updated it, so I don't know if that is why is acting up this way, this is how my eclipse.ini looks right now:

-startup
../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.101.v20120109-1504
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xmx512m
-Xmx1024m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts

我还可以做些什么来解决这个问题?任何帮助真的是AP preciated。在此先感谢。

what else can I do to fix this? any help is really appreciated. thanks in advance.

推荐答案

试试这个

在运行 - >运行配置发现你已经运行的类的名称,选中它,然后单击参数选项卡,然后添加:

In Run->Run Configuration find the Name of the class you have been running, select it, click the Arguments tab then add:

  -Xms512M -Xmx1524M

到VM参数部分

to the VM Arguments section

一些有用的链接

什么是Eclipse的最佳JVM的设置?

<一个href="http://stackoverflow.com/questions/15393215/error-java-heap-size-in-eclipse-android/15393350#15393350">Error &QUOT; Java堆大小&QUOT;在Eclipse的Andr​​oid?

编辑:

您的eclipse.ini设置生效只有你改变如下:

Your eclipse.ini settings will take effect only if you change following:

运行 - >外部工具 - >外部工具

Run -> External Tools -> External Tool

配置。去那个u使用的配置,在JRE选项卡 - 选择选项

Configurations. go to configuration that u use, under jre tab -select option

在同一个JRE中运行的工作空间。

Run in same JRE in workspace.

这篇关于日食与Android SDK,错误:Java堆空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆