Issue:
While building an Android app, you receive the error: java.lang.OutofMemoryError.
Possible solutions:
The Java Virtual Machine (JVM) probably ran out of heap space. You can adjust the heap size using
-Xms and -Xmx parameters. The-Xms parameter sets the initial Java heap size and the -Xmx parameter sets the maximum Java heap size.
To use these parameters, you can use the Env Vars tab to set values for the GRADLE_OPTS and the JAVA_OPTS Env Vars.
