title: Gradle build fails with Out of Memory: Java heap space error
body: <p>I am getting gradle build error while running the app. I am using windows 10 with 8GB RAM, Android studio version 4.0.1</p>
  <blockquote>
  <p>Out of memory: Java heap space. Please assign more memory to Gradle in
  the project's gradle.properties file. For example, the following line,
  in the gradle.properties file, sets the maximum Java heap size to
  1,024 MB: <em>org.gradle.jvmargs=-Xmx1024m</em></p>
  </blockquote>
  <p>Even after following the same steps I am not able to run the app. Could anyone help with a permanent solution for this error???</p>
  <p>Here is my gradle.properties file:</p>
  <pre><code>android.enableJetifier=true
  android.useAndroidX=true
  org.gradle.jvmargs=-Xmx1024m
  </code></pre>