If you have a large project, you might get this error when trying to do a full build
Error:java: OutOfMemoryError: insufficient memory
You can fix this by increase memory in two places in the IDE. For example, let says you want to increase to 2GB of memory:
-
Update the
idea64.exe.vmoptions
file with-Xmx2048m
to increase Java max heap memory size for your IDE. (Require IDE restart) -
Go to IDE menu: File > Settings … > Build, Execution, Deployment > Compiler > "Build process heap size (Mbytes):" and increase it to
2000
.