Android Question (Closed) Google Play Services (OutOfMemoryError)

rudystyle

Member
Licensed User
Longtime User
When I include the google play services jar in my project I get the following error. I increased the dexter memory size to 8GB. I have 16 GB RAM windows 7. What do I do?
The services is needed by 2 ad networks I am planning to use

B4X:
B4A version: 5.80
Parsing code.    (0.00s)
Compiling code.    (0.49s)
Compiling layouts code.    (0.01s)
Generating R file.    (1.16s)
Compiling generated Java code.    (1.71s)
Convert byte code - optimized dex.    Error
UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: Java heap space
    at com.android.dx.util.IntList.<init>(IntList.java:87)
    at com.android.dx.rop.code.RopMethod.calcPredecessors(RopMethod.java:173)
    at com.android.dx.rop.code.RopMethod.labelToPredecessors(RopMethod.java:94)
    at com.android.dx.dex.code.RopTranslator.pickOrder(RopTranslator.java:351)
    at com.android.dx.dex.code.RopTranslator.translateAndGetResult(RopTranslator.java:211)
    at com.android.dx.dex.code.RopTranslator.translate(RopTranslator.java:105)
    at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:319)
    at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:139)
    at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:94)
    at com.android.dx.command.dexer.Main.processClass(Main.java:613)
    at com.android.dx.command.dexer.Main.processFileBytes(Main.java:570)
    at com.android.dx.command.dexer.Main.access$2(Main.java:546)
    at com.android.dx.command.dexer.Main$2.processFileBytes(Main.java:514)
    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:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
 

rudystyle

Member
Licensed User
Longtime User
I got this solved. We need to close b4a and then change the memory settings. I got it working by changing MaxRamForDex = 1024
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…