-3

Okay, so I finally finished creating my first application that I spent a month building. And I went to build the APK so I can upload it to the Play Store and it hit me with this error.Error Image

  • 1
    Possible duplicate of [Android Studio Google JAR file causing GC overhead limit exceeded error](https://stackoverflow.com/questions/25013638/android-studio-google-jar-file-causing-gc-overhead-limit-exceeded-error) – Gino Mempin Aug 21 '17 at 04:23

2 Answers2

2

check this answer this

add this to build.gradle

dexOptions {
javaMaxHeapSize "4g"
}
Mayank Bhatnagar
  • 1,316
  • 2
  • 13
  • 21
0

I think it's because you've reached JVM maximum heap size.

Try add this to your app build.gradle file:

android {
    ...
    dexOptions {
        jumboMode = true
        javaMaxHeapSize "4g"
    }
}