Android Studio Out of Memory

I was fighting with this problem today for a few hours and ended up trying File -> Invalidate Caches / Restart... and chose the Invalidate/Restart option. Seems to have fixed the Out of Memory error.

Don't know if that will work for you at a later time, but hopefully it helps.


Go to /Applications and do right click on Android Studio > show package contents Then go to /Contents/bin/studio.vmoptions and change it like this:

-Xms128m

-Xmx800m

-XX:MaxPermSize=350m

-XX:ReservedCodeCacheSize=96m

-XX:+UseCompressedOops