[英]Eclipse ADT running out of memory and keeps crashing?
I've been using ADT for a while now and things have been going smoothly enough.我已经使用 ADT 一段时间了,并且一切进展顺利。 All of a sudden, Eclipse declares that it's short on memory "Java heap space" troubles and whatnot... I've searched all over and every piece of advice seems to point to editing the file
eclipse.ini
.突然之间,Eclipse 声明它的内存不足“Java 堆空间”问题等等......我已经搜索了所有的建议似乎都指向编辑文件
eclipse.ini
。
Most of the advice said to turn the memory up to 512m
.大多数建议都说将内存提高到
512m
。 I did that, but it wasn't fixing anything.我这样做了,但它没有解决任何问题。 So I upped it to
1024m
.所以我把它提高到
1024m
。 Still no luck, so I upped it again to 2048m
.仍然没有运气,所以我再次将其提高到
2048m
。 Still no success!还是没有成功! My
eclipse.ini
now looks like this:我的
eclipse.ini
现在看起来像这样:
-showsplash
org.eclipse.platform
-startup
../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20120913-144807
-product
com.android.ide.eclipse.adt.package.adtproduct
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
1024m
--launcher.defaultAction
openFile
-vmargs
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=1024m
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Xms1024m
-Xmx2048m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
ADT still crashes. ADT 仍然崩溃。 It seems like
2048m
should be plenty of memory already, but ADT still complains about it.看起来
2048m
应该已经足够内存了,但ADT仍然抱怨它。 So is there another problem that could be prompting this symptom?那么是否还有另一个问题可能会引发这种症状? Keep in mind that my app was working just fine minutes before the IDE started going bonkers.
请记住,在 IDE 开始疯狂之前,我的应用程序运行良好。
EDIT:编辑:
I've also tried deleting the entire ADT folder from Applications (I use a Mac), re-placed it back with a different copy of the ADT again.我还尝试从应用程序中删除整个 ADT 文件夹(我使用的是 Mac),然后再次使用 ADT 的不同副本将其重新放回原处。 This also did nothing.
这也无济于事。
I had the same Problem.我有同样的问题。 I solved it by making space in my c drive.
我通过在我的 c 驱动器中腾出空间来解决它。
You can try this:你可以试试这个:
Back up your dev environment备份您的开发环境
Install latest version of eclipse with adt into a new folder.使用 adt 将最新版本的 eclipse 安装到新文件夹中。 https://developer.android.com/sdk/index.html
https://developer.android.com/sdk/index.html
When you start the new version of eclipse point it to your old workspace.当您启动新版本的 eclipse 时,将其指向您的旧工作区。
Edit One of things I do is set every project to the same api level.编辑我做的一件事是将每个项目设置为相同的 api 级别。 Api 19.
阿皮 19.
I eventually found the culprit: an errant JAR file in the project library.我最终找到了罪魁祸首:项目库中的错误 JAR 文件。 After deleting it, things ran normally again.
删除后,一切又正常了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.