tompal18
tompal18

Reputation: 1216

android java heap space

When I include more than about 5 jars, the eclipse goes down while compiling due to heap memory.

An internal error occurred during: "Activity Monitor Job".
Java heap space
Unable to execute dex : java heap space

My PC has 2GB memory and eclipse.ini is as follows

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-showsplash
org.eclipse.platform
-vm
C:/Program Files/Java/jdk1.7.0/bin/javaw.exe
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx700m

I tried to put the jars on Library on the eclipse build path setting. But it gives me VerifyError.

Do I need to increase ram memory?

Upvotes: 3

Views: 3083

Answers (2)

M. Usman Khan
M. Usman Khan

Reputation: 4408

Here is a short and precise solution: https://www.simplified.guide/eclipse/fix-gc-overhead-limit-exceeded

Upvotes: 2

Michael
Michael

Reputation: 2500

You can try increasing the maximum heap space allowed for eclipse by changing the value for -Xmx700m to something larger. This setting in your Eclipse ini is currently limiting the JVM to 700MB. I'm not sure what amount to tell you to allocate. However through trial-and-error you should be able to find a number that works for you.

Upvotes: 3

Related Questions