Android Studio : Gradle build takes more RAM?

Vivek Yadav
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.

  1. Open Android project (or goto project directory in file manager)
  2. Open gradle.properties file.
  3. Edit this property: org.gradle.jvmargs
  4. org.gradle.jvmargs=-Xmx1536m” ==> 1536 is number of ram that should be used by gradle.
  5. Reduce this number to your need. For example I use “org.gradle.jvmargs=-Xmx1024m
  6. 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

--

--

Vivek Yadav
Vivek Yadav

Written by Vivek Yadav

Writer , Speaker, Instructor and Flutter Dev

No responses yet