title: There is not enough memory to perform requested operation-Android studio
body: <p>I have been using Android Studio 2.1 for a while now, and in my previous projects, it seemed to work just fine. But now I got this error:
  <a href="https://i.stack.imgur.com/nIOoQ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nIOoQ.png" alt="enter image description here"></a></p>
  
  <p>This pestered me for a while until I decided to google solutions and ended up with some informative details like <a href="https://stackoverflow.com/questions/18723755/android-studio-how-to-increase-allocated-heap-size">how to increase the heapsize</a> and <a href="https://stackoverflow.com/questions/23440647/android-studio-gradle-outofmemory-error">this seemed to work for the OP.</a></p>
  
  <p>I haven't been successful yet.</p>
  
  <p>I have twerked with the <code>studio64.vmoptions</code> file directly (even though A.S explicitly adviced otherwise, but i was desperate)</p>
  
  <p>I noticed the problem occured  a while later after intergrating Google Places API  but i cannot establish the connection yet between the two.</p>
  
  <p>Any suggestions? I could really use some help, my backlogged work is pilling up :(</p>
  
  <p>This is how my vmoptions looks like:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code># custom Android Studio VM options
  
  #
  # *DO NOT* modify this file directly. If there is a value that you would like to override,
  # please add it to your user specific configuration file.
  #
  # See http://tools.android.com/tech-docs/configuration
  #
  -Xms512m
  -Xmx2048m
  -XX:MaxPermSize=512m
  -XX:ReservedCodeCacheSize=240m
  -XX:+UseConcMarkSweepGC
  -XX:SoftRefLRUPolicyMSPerMB=50
  -da
  -Djna.nosys=true
  -Djna.boot.library.path=
  
  -Djna.debug_load=true
  -Djna.debug_load.jna=true
  -Dsun.io.useCanonCaches=false
  -Djava.net.preferIPv4Stack=true
  -XX:+HeapDumpOnOutOfMemoryError
  -Dawt.useSystemAAFontSettings=lcd</code></pre>
  </div>
  </div>
  </p>
  
  <p>Just additional info: I am on a Linux OS.</p>