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
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 = -Xmx1gOr 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