Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conversion to Dalvik format failed: Unable to execute dex: GC overhead limit exceeded

I am stuck with this error from last 3 hours.When I checked out latest code from SVN after that it suddenly stopped working.

Note:

My new project size is around 135 MB and I m using eclipse kepler.

Also there are 3 jars in myApp/res/libs named as sqlite.jar, ksoap2.jar, rt.jar

So I googled and found This Answer. And also Blog 1 and Blog 2 I have edited eclipse.ini

From:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140116-2212
-product
org.eclipse.epp.package.standard.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m

To

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140116-2212
-product
org.eclipse.epp.package.standard.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
1024M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
1024m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms512m
-Xmx1024m 

But It is still not working and getting the same error in eclipse. Any help would be appreciated.

like image 887
TheFlash Avatar asked Apr 21 '14 12:04

TheFlash


2 Answers

The solution to this is to remove rt.jar (there are 18635 class files) file from your project. It's a heavy jar. In JRE or J2EE/J2ME, that jar file used by default. In Android I'll not, so we have to add manually.

like image 126
Er.Shreyansh Shah Avatar answered Sep 21 '22 00:09

Er.Shreyansh Shah


Increase the value of these parameters in Eclipse Configuration Setting file

-XX:MaxPermSize=256m
-Xms40m
-Xmx512m

make them as-

-XX:MaxPermSize=1024m
-Xms512m
-Xmx1024m
like image 28
Trojan Horse Avatar answered Sep 21 '22 00:09

Trojan Horse