eclipse “无法执行 dex:超出 GC 开销限制”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22282980/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 21:34:03  来源:igfitidea点击:

"Unable to execute dex: GC overhead limit exceeded"

androideclipse

提问by Angbeny Finch

I am designing an android application with eclipse. When I try to run I see this window:

我正在用 Eclipse 设计一个 android 应用程序。当我尝试运行时,我看到这个窗口:

enter image description here

在此处输入图片说明

The message is

消息是

"Unable to execute dex: GC overhead limit exceeded GC overhead limit exceeded"

“无法执行 dex:超出 GC 开销限制 超出 GC 开销限制”

回答by brainvision

Already asked and already solved, more than once.. BTW you should edit the eclipse.ini file and give more Virtual Memory to it!

已经问过并且已经解决了,不止一次..顺便说一句,您应该编辑 eclipse.ini 文件并为其提供更多的虚拟内存!

So, for example:

因此,例如:

--launcher.XXMaxPermSize
256M
-showsplash
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m

Those are my default values.. try with something like that

这些是我的默认值.. 尝试类似的东西

--launcher.XXMaxPermSize
512M
-showsplash
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms512m
-Xmx1024m

Look here for more details: Unable to execute dex: GC overhead limit exceeded in Eclipse

在此处查看更多详细信息:无法执行 dex:Eclipse 中超出了 GC 开销限制

I also find useful when something like GC overhead problems happen this solution: https://stackoverflow.com/a/20461943/3443362If you don't have so much RAM on your PC/laptop this last suggestion is musch more better..

当发生 GC 开销问题时,我也发现此解决方案很有用:https: //stackoverflow.com/a/20461943/3443362 如果您的 PC/笔记本电脑上没有这么多 RAM,那么最后一个建议更好..