How to increase Android Studio memory limit in Mac

The technical doc of configuring Android Studio on the Android Tools Project site is out dated. So you can not increase memory limit by configuring the studio.vmoptions file under ~/Library/Preferences/AndroidStudio/ folder. Actually, in my case, there is no studio.vmoptions or file like the doc said.

Locate the configuration file

If you are using Terminal, run command

open -e /Applications/Android\

Or, you can also open Applications folder in Finder, press ctrl then click or just right-click on Android Studio, choose Show Package Contents, you can find studio.vmoptions file under Contents/bin folder.

Config your settings

You can just edit your studio.vmoptions file, increasing your Xms and Xmx.

Xmx specifies the maximum memory allocation pool for a Java Virtual Machine (JVM), while Xms specifies the initial memory allocation pool. Your JVM will be started with Xms amount of memory and will be able to use a maximum of Xmx amount of memory.

This is my configuration:


Once you make the changes, don't forget to RESTART Android Studio.


If you want to fall back to default values, here it is:


Or you can download it from the Android Tools Project Site.

I think increasing the memory limit in IntelliJ IDEA is the same, I didn't check it though.