Android Studio : Gradle build takes more RAM?
1 min readNov 9, 2018
Android Studio use gradle to make apks. While doing this, it uses lots of RAM. And this could be a big problem for those who have low configuration pc or laptop.
Let’s see a small solution that might help you. We are going to edit one file which tells gradle that how much ram it should use.
- Open Android project (or goto project directory in file manager)
- Open gradle.properties file.
- Edit this property: org.gradle.jvmargs
- “org.gradle.jvmargs=-Xmx1536m” ==> 1536 is number of ram that should be used by gradle.
- Reduce this number to your need. For example I use “org.gradle.jvmargs=-Xmx1024m”
- This would definitely reduce Ram(memory) usage by Android Studio.
Let me know in comments if this works for you. Have a good day.
Connect with me on: Github Twitter LinkedIn Instagram Youtube Patreon