Facing issue while compiling companion app

Hello Everyone, I am facing an issue while compiling ai2 companion app.
The issue is java.lang.OutOfMemoryError: GC overhead limit exceeded

Build failed logs are below:
[java] Picked up _JAVA_OPTIONS: -Xmx1024m
[java] warning: Ignoring InnerClasses attribute for an anonymous inner class
[java] (org.shaded.apache.commons.logging.LogFactory$1) that doesn't come with an
[java] associated EnclosingMethod attribute. This class was probably produced by a
[java] compiler that did not target the modern .class file format. The recommended
[java] solution is to recompile the class from source, using an up-to-date compiler
[java] and without specifying any "-target" type options. The consequence of ignoring
[java] this warning is that reflective operations on this class will incorrectly
[java] indicate that it is not an inner class.
[java] warning: Ignoring InnerClasses attribute for an anonymous inner class
[java] (org.shaded.apache.commons.logging.LogFactory$2) that doesn't come with an
[java] associated EnclosingMethod attribute. This class was probably produced by a
[java] compiler that did not target the modern .class file format. The recommended
[java] solution is to recompile the class from source, using an up-to-date compiler
[java] and without specifying any "-target" type options. The consequence of ignoring
[java] this warning is that reflective operations on this class will incorrectly
[java] indicate that it is not an inner class.
[java] warning: Ignoring InnerClasses attribute for an anonymous inner class
[java] (org.shaded.apache.commons.logging.LogFactory$4) that doesn't come with an
[java] associated EnclosingMethod attribute. This class was probably produced by a
[java] compiler that did not target the modern .class file format. The recommended
[java] solution is to recompile the class from source, using an up-to-date compiler
[java] and without specifying any "-target" type options. The consequence of ignoring
[java] this warning is that reflective operations on this class will incorrectly
[java] indicate that it is not an inner class.
[java] warning: Ignoring InnerClasses attribute for an anonymous inner class
[java] (org.shaded.apache.commons.logging.LogFactory$6) that doesn't come with an
[java] associated EnclosingMethod attribute. This class was probably produced by a
[java] compiler that did not target the modern .class file format. The recommended
[java] solution is to recompile the class from source, using an up-to-date compiler
[java] and without specifying any "-target" type options. The consequence of ignoring
[java] this warning is that reflective operations on this class will incorrectly
[java] indicate that it is not an inner class.
[java] warning: Ignoring InnerClasses attribute for an anonymous inner class
[java] (org.shaded.apache.commons.logging.LogFactory$3) that doesn't come with an
[java] associated EnclosingMethod attribute. This class was probably produced by a
[java] compiler that did not target the modern .class file format. The recommended
[java] solution is to recompile the class from source, using an up-to-date compiler
[java] and without specifying any "-target" type options. The consequence of ignoring
[java] this warning is that reflective operations on this class will incorrectly
[java] indicate that it is not an inner class.
[java] warning: Ignoring InnerClasses attribute for an anonymous inner class
[java] (org.shaded.apache.commons.logging.LogFactory$5) that doesn't come with an
[java] associated EnclosingMethod attribute. This class was probably produced by a
[java] compiler that did not target the modern .class file format. The recommended
[java] solution is to recompile the class from source, using an up-to-date compiler
[java] and without specifying any "-target" type options. The consequence of ignoring
[java] this warning is that reflective operations on this class will incorrectly
[java] indicate that it is not an inner class.
[java] warning: Ignoring InnerClasses attribute for an anonymous inner class
[java] (org.shaded.apache.commons.logging.impl.LogFactoryImpl$1) that doesn't come with an
[java] associated EnclosingMethod attribute. This class was probably produced by a
[java] compiler that did not target the modern .class file format. The recommended
[java] solution is to recompile the class from source, using an up-to-date compiler
[java] and without specifying any "-target" type options. The consequence of ignoring
[java] this warning is that reflective operations on this class will incorrectly
[java] indicate that it is not an inner class.
[java] warning: Ignoring InnerClasses attribute for an anonymous inner class
[java] (org.shaded.apache.commons.logging.impl.LogFactoryImpl$2) that doesn't come with an
[java] associated EnclosingMethod attribute. This class was probably produced by a
[java] compiler that did not target the modern .class file format. The recommended
[java] solution is to recompile the class from source, using an up-to-date compiler
[java] and without specifying any "-target" type options. The consequence of ignoring
[java] this warning is that reflective operations on this class will incorrectly
[java] indicate that it is not an inner class.
[java] warning: Ignoring InnerClasses attribute for an anonymous inner class
[java] (org.shaded.apache.commons.logging.impl.LogFactoryImpl$3) that doesn't come with an
[java] associated EnclosingMethod attribute. This class was probably produced by a
[java] compiler that did not target the modern .class file format. The recommended
[java] solution is to recompile the class from source, using an up-to-date compiler
[java] and without specifying any "-target" type options. The consequence of ignoring
[java] this warning is that reflective operations on this class will incorrectly
[java] indicate that it is not an inner class.
[java] warning: Ignoring InnerClasses attribute for an anonymous inner class
[java] (org.shaded.apache.commons.logging.impl.SimpleLog$1) that doesn't come with an
[java] associated EnclosingMethod attribute. This class was probably produced by a
[java] compiler that did not target the modern .class file format. The recommended
[java] solution is to recompile the class from source, using an up-to-date compiler
[java] and without specifying any "-target" type options. The consequence of ignoring
[java] this warning is that reflective operations on this class will incorrectly
[java] indicate that it is not an inner class.
[java] warning: Ignoring InnerClasses attribute for an anonymous inner class
[java] (org.shaded.apache.commons.logging.impl.WeakHashtable$1) that doesn't come with an
[java] associated EnclosingMethod attribute. This class was probably produced by a
[java] compiler that did not target the modern .class file format. The recommended
[java] solution is to recompile the class from source, using an up-to-date compiler
[java] and without specifying any "-target" type options. The consequence of ignoring
[java] this warning is that reflective operations on this class will incorrectly
[java] indicate that it is not an inner class.
[java]
[java] UNEXPECTED TOP-LEVEL ERROR:
[java] java.lang.OutOfMemoryError: GC overhead limit exceeded
[java] Jul 01, 2021 2:32:03 PM com.google.appinventor.buildserver.Compiler setProgress
[java] INFO: The current progress is 75%
[java] Jul 01, 2021 2:32:03 PM com.google.appinventor.buildserver.Compiler runMultidex
[java] INFO: DX time: 745.525000 seconds
[java] Jul 01, 2021 2:32:03 PM com.google.appinventor.buildserver.Compiler runMultidex
[java] WARNING: YAIL compiler - DX execution failed.

How I can resolve these issues?
Any solution to this?

Regards,
Kunal Mishra

Hello @Official_KunalMishra Here I see an issue

My guess : change your JAVA_OPTIONS , set them to -Xmx2048m instead of -Xmx1024m

1 Like

There's a second flag in buildserver/build.xml childProcessRamMb that controls the amount of memory used for the dx process. By default it is 2 GB. You can try increasing it to a larger value to reduce the chances of an OOM error.

3 Likes

Thanks @Know_About_IT and @ewpatton for that solutions.

1 Like

increase 1024m to 2048m and also make change in sources

1 Like