Skip to content Skip to sidebar Skip to footer

How To Fix "outofmemoryerror: Java Heap Space" While Compiling Monodroid App In Monodevelop

When I try to compile (not execute) one of my projects, I recently get the following error: Tool /usr/bin/java execution started with arguments: -jar /Applications/android-sdk-mac_

Solution 1:

There is an option in Xamarin Studio to increase the Java Heap Size.

Project Options -> Android Build -> Advanced -> Java Heap Size.

enter image description here

Solution 2:

This suggestion did the trick:

$ export _JAVA_OPTIONS="-Xmx1g"$ /Applications/MonoDevelop.app/Contents/MacOS/MonoDevelop

I have a few jar files in my project. Flurry, Maps and Newtonsoft... aparently this is enough to bomb the build.

Thanks to the awesome Xamarin Support team for their quick response and pointing out the solution! They are working on reducing the needed memory footprint for external jars.

Post a Comment for "How To Fix "outofmemoryerror: Java Heap Space" While Compiling Monodroid App In Monodevelop"