· OutOfMemoryError – It’s possible that gradle is running in 32-bit mode when it should be running in 64 bit mode. To check whether gradle is running in 32-bit mode or 64-bit mode, in the build.gradle file, dump out a few system properties as follows:
If sun.arch.data.model has a value of 32, then it’s running in 32-bit mode.
Double check that the JAVA_HOME environment variable is set to a path similar to
If the path points to C:\Program Files (x86), then it is likely to be running in 32 bit mode. In this case reinstall jdk for java in 64-bit.
Another symptom of running in 32-bit mode is if you try increasing the memory allocation higher than 1 GB you may get the following error: