Android Question out of memory compiling

merlin2049er

Well-Known Member
Licensed User
Longtime User
Hi,
I got an out of memory error while compiling, after adding admob resources to my latest build.

B4X:
UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: GC overhead limit exceeded
    at com.android.dx.ssa.SsaRenamer.<init>(SsaRenamer.java:111)
    at com.android.dx.ssa.SsaConverter.convertToSsaMethod(SsaConverter.java:52)
    at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:98)
    at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:72)
    at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:297)
    at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:137)
    at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:93)
    at com.android.dx.command.dexer.Main.processClass(Main.java:729)
    at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
    at com.android.dx.command.dexer.Main.access$300(Main.java:83)
    at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
    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:632)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
    at com.android.dx.command.dexer.Main.run(Main.java:246)
    at com.android.dx.command.dexer.Main.main(Main.java:215)
    at com.android.dx.command.Main.main(Main.java:106)
Picked up _JAVA_OPTIONS:  -Xmx512M
    Optimized dexer failed. Switching to Standard dexer.


Any options to increase my java overhead? I've got 16gb ram in my pc.
 

DonManfred

Expert
Licensed User
Longtime User
Have you tried to add
B4X:
SetApplicationAttribute(android:largeHeap, "true")
to your manifest?
 
Upvote 0

merlin2049er

Well-Known Member
Licensed User
Longtime User
ok, thanks.

I tried the adding that to the manifest, it didn't help much.

I removed it and set the _java_options
from -Xmx-512m to -Xmx-1g

That worked.
 
Upvote 0
Top