title: Building signed APK of release build fails but debug succeeds. Missing class
body: <p>When going to build the signed APK for my app if I select the debug build it compiles fine, but when I choose the release build it sits on </p>
  
  <blockquote>
    <p>:app:transformClassesAndResourcesWithR8ForRelease</p>
  </blockquote>
  
  <p>and it says </p>
  
  <blockquote>
    <p>Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded</p>
  </blockquote>
  
  <p>as well as </p>
  
  <blockquote>
    <p>AGPBI: {"kind":"warning","text":"Missing class
    android.arch.paging.PositionalDataSource","sources":[{}],"tool":"D8"}</p>
  </blockquote>
  
  <p>I have tried adding to my build.gradle(module)</p>
  
  <pre><code>dexOptions{
      javaMaxHeapSize "8g"
  }
  </code></pre>
  
  <p>as well as adding some ignoring to the proguard.cfg</p>
  
  <p>NOTE: I am using MacOS if that might have anything to do with it</p>