title: Infinite Gradle Build Running Java 8
body: <p>I try to migrate from Java 7 to Java 8, so I have install the new sdk for Android N and all tools. I follow the <a href="https://developer.android.com/preview/j8-jack.html#supported-features" rel="nofollow">developper guide to use Java 8 in android studio</a>, but when i try to compile apk, I have an infinite Gradle Build Running.. I already try to restart Android Studio, but after 1 hour, the Gradle Build Running it's not finished. In the Windows task manager I see the process java.exe take a lot of memory and CPU was at 90%.</p>
  
  <p>Someone already encountered this problem ?</p>
  
  <p>Thanks.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I have the following versions :</p>
  
  <pre><code>Java version : 1.8.0_92
  Gradle version : 2.1.2
  Android Studio version : 2.1.2
  
  compileSdkVersion : 24
  buildToolsVersion : 24
  
  targetSdkVersion : 24
  </code></pre>
  
  <p><strong>Edit2:</strong></p>
  
  <p>I tried with Android Studio 2.2 and 5 minutes after starting the build, I have this error :</p>
  
  <pre><code>Error:Execution failed for task ':app:compileProductionDebugJavaWithJack'. 
  &gt; java.lang.RuntimeException: java.lang.OutOfMemoryError: GC overhead limit exceeded
  </code></pre>