I am trying to compile a very large project with multiple Android projects using the Ant command line. I originally used Ant 1.8.3, but since then I upgraded to 1.8.4 (it turns out in vain). Although I have Eclipse installed (Indigo, updated today), the nature of this project precludes using Ant from within Eclipse to do this.
The code seems to be generated just fine, but when it comes to the “dex” phase of the operation, it gets one of two errors, depending on my ANT_OPTS : “GC upper limit exceeded” or “Java Heap Space”.
I googled and checked the stack. After finding various links (cf here , here , this question is on the stack and this question is on the stack ), I changed the Ant settings. (Many links cover what happens when it happens while executing Java code, my problem is actually in the Ant process that creates the Android APK for download).
My environment variable ANT_OPTS currently:
-Xms4g -Xmx4g -Xmn256m -XX:PermSize=256m -XX:MaxPermSize=1024m -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=8
I tried disabling the GC upper limit using -XX:-UseGCOverheadLimit , but all that does is give me a Java Heap Space error instead of a GC upper limit error. I asked my colleagues about this, but they also have no ideas.
Oh, another “detail”: I can use Eclipse to compile and download the project, and this seems to work “perfectly”; however, the sheer number of projects needed for this "metaproject" suggests that I am trying to get Ant script to work.
System Information:
- OS: Windows 7 64 bit
- Java: Sun, 1.6, 64 bit
- Physical memory: 8 GB
- Android: SDK Tools: R20; Platform Tools: R12 (updated today, June 28)
Is there anything else I can do? Another search keyword? Anywhere else to see?
source share