title: TensorFlow android throw java.lang.OutOfMemoryError when building project, but there's free 20GB memory
body: <p><img src="https://user-images.githubusercontent.com/12729184/160032113-66a91d3c-81cf-4ac0-a5e7-f4046f5da39c.png" alt="image" /></p>
  <p>My process:</p>
  <ul>
  <li>Clone project from <a href="https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/android/test" rel="nofollow noreferrer">https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/android/test</a></li>
  <li>Click build button (My PC memory : 11.7/31.9 GB (37%))</li>
  <li>When building the memory only use 2GB, then it throwed error :</li>
  </ul>
  <pre><code>:packageDebug' `
  &gt; A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
  &gt; java.lang.OutOfMemoryError (no error message)
  </code></pre>
  <ul>
  <li>My PC has hyper-v</li>
  </ul>
  <p>I tried to search google and found</p>
  <ul>
  <li><a href="https://stackoverflow.com/questions/42926932/outofmemoryerror-java-heap-space-on-tensorflow-tests-execution">OutOfMemoryError: Java heap space on Tensorflow tests execution</a></li>
  <li><a href="https://stackoverflow.com/questions/43571489/outofmemoryerror-when-loading-200mb-file-from-assets-fodler">OutOfMemoryError when loading ~200mb file from assets fodler</a></li>
  </ul>
  <p>But they don't solve my problem.</p>
  <p>Did I miss some key steps?  Really appreciate!</p>