解决Unable to execute dex: Multiple dex files define La;问题

来源:互联网 发布:网络商务通讯有限公司 编辑:程序博客网 时间:2024/05/17 06:04

Unable to execute dex: GC overhead limit exceeded

Have you gotten these errors?

[2013-04-03 00:00:00 - Dex Loader] Unable to execute dex: GC overhead limit exceeded[2013-04-03 00:00:00 - OsmAnd] Conversion to Dalvik format failed: Unable to execute dex: GC overhead limit exceeded

I have a few times now and decided to learn how to fix it. The error is caused by Eclipse not having enough memory for large projects.

Solution:
Change some values in your Eclipse.ini file. This file is located wherever you downloaded Eclipse. If you don’t know where that is, then check your Downloads folder. Depending on which version of Eclipse you are using, the folder may either be called something like “eclipse-mobile-juno-SR1-win32-x86_64″ or “adt-bundle-windows-x86_64-20130219″, if you didn’t already move the eclipse folder from within it.

When you open Eclipse.ini, you should see something like:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-product
com.android.ide.eclipse.adt.package.product
–launcher.XXMaxPermSize
256M
-showsplash
com.android.ide.eclipse.adt.package.product
–launcher.XXMaxPermSize
256m
–launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms512m
-Xmx1024m
-Declipse.buildId=v21.1.0-569685
Change the two values at the bottom to something like the following and you’ll be better off. Just restart Eclipse for the changes to take effect.

-Xms512m
-Xmx1024m

Source: http://docs.oseems.com/general/application/eclipse/fix-gc-overhead-limit-exceeded

0 0