- Öncelikle android studionun kurulu olduğu dizinde yer alan bin/studio.vmoptions dosyasını açıp şu şekilde değiştirelim
Şundan:
Xms128m
Xmx800m
Şuna:
Xms256m
Xmx1024m
2. c:\users\kullanici_adi\.gradle dizinine gidip(benimki: c:\Users\mustafa\.gradle) gradle.properties dosyasını oluşturun ve içine şunu yazın.
org.gradle.daemon=true
ve android studioyu yeniden başlatın.
1. Increase the memory size of Android Studio:
Open the file located at /bin/studio.vmoptions and Change the content from
Xms128m
Xmx800m
to
Xms256m
Xmx1024m
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.
Save the studio.vmoptions file and restart Android Studio.
2. Improve Gradle performance:
Create a file named gradle.properties in
/home/<username>/.gradle/ (Linux)
/Users/<username>/.gradle/ (Mac)
C:\Users\<username>\.gradle (Windows)
and add the line:
org.gradle.daemon=true
Kaynak :
https://stackoverflow.com/questions/36861943/any-solution-for-android-studio-slow-gradle-build-and-high-disk-usage/36862637