GC overhead limit exceeded

72 views
Skip to first unread message

Iliya

unread,
Oct 4, 2015, 4:43:15 PM10/4/15
to adt-dev
Just started getting this error since I upgraded to Android Studio 1.4. Haven't changed any of the settings which is what seems strange. Anyone else here run into similar issues and found a workaround?

UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:88)
at java.util.zip.ZipFile$ZipFileInflaterInputStream.<init>(ZipFile.java:394)
at java.util.zip.ZipFile.getInputStream(ZipFile.java:375)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:270)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:569)
at com.android.dx.command.dexer.Main.runMultiDex(Main.java:366)
at com.android.dx.command.dexer.Main.run(Main.java:275)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)

This happens during the dexArm7Debug step.

BTW using the experimental gradle plugin 0.2.0 for NDK support.

Iliya

unread,
Oct 5, 2015, 11:06:08 AM10/5/15
to adt-dev
Nevermind, managed to fix this myself by adding this to my build.gradle file
model {
    android {
        ...
dexOptions.with {
            incremental = true
            javaMaxHeapSize = "4g"
        }
    }
    ...
}
Reply all
Reply to author
Forward
0 new messages