

You can choose how much RAM to allocate to the emulator:Īndroid Studio has recently published an official guide for low-memory machines: Guide Regarding the emulator taking up a lot of your RAM, your screenshot shows it taking about 800MB. Note that you might need to restart Android Studio so the old Gradle process is killed otherwise you might end up with both running at the same time. I haven't noticed any difference in build performance for my small project with the max heap size set to 256MB ( -Xmx256m). I set mine to this: =-Xmx256m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 Update the property, creating it if necessary. Windows: %USERPROFILE%\.gradle\gradle.properties.Open the gradle.properties file, creating it if it doesn't exist:.You can do this on a per-user basis by editing gradle.properties: You can fix this by changing the Gradle JVM options. Windows just shows it as Java(TM) Platform SE Binary: Gradle can also use a lot of RAM after developing for a while. Unfortunately, I found that lowering this value increases the frequency of Android Studio temporarily freezing, perhaps to do its garbage collection. For example, I changed my max heap size to 512MB: -Xmx512m You can reduce this by editing the memory-related settings in the. You can see this in the lower-right corner of the main interface: The IDE's JVM is configured to have a max heap size. In my case, there were two main sources of memory hogging: the IDE and Gradle: Android Studio (up to 1.5GB)
