0

Today I randomly started getting the following error when trying to compile my Adobe Air App from InteliJ Idea.

Failed to package AIR application FARQAndroidFree.apk:
            dx tool failed:
            UNEXPECTED TOP-LEVEL ERROR:
            java.lang.OutOfMemoryError: GC overhead limit exceeded
            at java.util.Arrays.copyOf(Arrays.java:3181)
            at java.util.ArrayList.grow(ArrayList.java:261)
            at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:235)
            at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:227)
            at java.util.ArrayList.add(ArrayList.java:458)
            at com.android.dx.ssa.Dominators$DfsWalker.visitBlock(Dominators.java:263)
            at com.android.dx.ss...
            [Full error message]
            [ADT command line]

I'm using the Adobe AIR SDK 28

colouredFunk
  • 778
  • 1
  • 13
  • 35
  • 1
    Have you tried increasing the amount of memory available to Java in your IntelliJ? Preferences / Build ... / Compiler / Actionscript ... / Compiler heap size – Michael Jan 01 '18 at 03:35
  • wow @Michael that worked!! I've been pulling my hair out over this (I didn't actually see your comment until now :o ) ... compiling is super slow though... – colouredFunk Jan 31 '18 at 05:35
  • You using a lot of ANEs or something in your project? These can increase the compilation time sometimes. – Michael Jan 31 '18 at 05:37
  • Yep a lot of your ones ;) It takes up to 5-10mins, which is a bit of a nightmare when debugging. – colouredFunk Jan 31 '18 at 05:38
  • Gosh, what sort of machine are you working on? I've got projects with a lot of ANEs in it but they never take more than a minute or 2, maybe a touch more for a release. I'll add the above comment as an answer for this question anyways. – Michael Jan 31 '18 at 05:43
  • a fully spec'd out Mac Book Pro 2017, so it should be super fast!! Updating this app is pretty much impossible at the moment :( – colouredFunk Jan 31 '18 at 05:48
  • Interestingly @Michael I managed to get it to compile on my Windows machine using Flash Builder and is it a lot quicker!! – colouredFunk Feb 01 '18 at 03:43
  • Weird, could be related to the version of Java you have on the mac or java memory settings I suppose. – Michael Feb 02 '18 at 05:03

1 Answers1

3

Try increasing the amount of memory available to the Java runtime used by IntelliJ to package your application.

You will find this in:

Preferences / Build ... / Compiler / Actionscript ... / Compiler heap size

Try somewhere in the 512 - 1024 Mb mark.

enter image description here

Michael
  • 3,776
  • 1
  • 16
  • 27