java.lang.OutOfMemoryError. Consider increasing the value of $(JavaMaximumHeapSize). Java ran out of memory while executing 'java.exe'

I was getting a java.lang.OutOfMemoryError while trying to compile a Xamarin Android application after adding HockeyApp.

I found to ways to resolve this.

The first option is to add a Environment Variable called _JAVA_OPTIONS and set it to -Xmx1g.  This sets the JVM heap size to 1GB.  You can either do this from the commandline by calling
SET _JAVA_OPTIONS = -Xmx1g
Or you can edit your system environment variables:



The second and my preferred option was to to update the Java Max Heap Size in the Advanced Android Options tab in the Xamarin Android Visual Studio project:


Comments

Thank you for sharing this content in your post thank you apart form that if anyone look for Python training institute in Delhi Contact Here-+91-9311002620 Or Visit Website- https://www.htsindia.com/Courses/python/python-training-institute-in-delhi