今天遇到了一个问题,打包时候 ADT提示 Unable to execute dex: GC overhead limit exceeded GC overhead limit exceeded 。
找了半天才找到解决方法,那就是 修改 adt 的 默认 大小,在 eclipse.ini 中 修改原来默认的 到 512M,1024M,如下所示:
openFile
--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms512m
-Xmx1024m
可是问题来了,我是mac新手,没法找到 eclipse.ini 文件。又是一番查找,终于在某个全英文网站找到了答案,如下所示:
On a Mac OS X system, you can find eclipse.ini
by right-clicking (or Ctrl+click) on the Eclipse executable in Finder, choose Show Package Contents, and then locate eclipse.ini
in the Eclipse
folder under Contents
. The path is often
/Applications/Eclipse.app/Contents/Eclipse/eclipse.ini
我来翻译一下,找到 application文件下 eclipse.app 或者安装目录下的 eclipse.app 右键---显示包内容。
然后就是见证奇迹的时刻
为了以后温故知新,所以写一下。