title: java.lang.OutOfMemoryError: GC overhead limit exceeded
body: <p>Using <code>Android Studio 3.0 Beta 6.</code> This error is happening more and more, when I try build my project: </p>
  
  <blockquote>
    <p>Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
    java.lang.OutOfMemoryError: GC overhead limit exceeded</p>
  </blockquote>
  
  <p>I have tried to fix it using this SO answer: 
  <a href="https://stackoverflow.com/questions/35034830/android-studio-gc-overhead-limit-exceeded">Android Studio: GC overhead limit exceeded</a></p>
  
  <p>However it has made no difference. The only way to fix it, is a reboot of my MBP and then all is fine for the next few builds, until it resurfaces again. </p>
  
  <p>Any ideas how to fix this? </p>