title: Java Heap Space error while running Android app in Android Studio
body: <p>I am a newbie to <code>Android Studio</code>. When I try to run a sample Android app I am getting the following error :</p>
  
  <p><code>Error:Java heap space
  Please assign more memory to Gradle in the project's gradle.properties file.</code></p>
  
  <p>I have changed the following in the <code>studio.vmoptions</code> file in <code>bin</code></p>
  
  <p>-Xms512m</p>
  
  <p>-Xmx1024m</p>
  
  <p>But changing to the above values also doesn't help.</p>
  
  <p>Can anyone guide me step by step what to do.</p>