我有问题。 我有一个使用monodroid库构建的应用程序。 android sdk 4.0.3(API级别15),GoogleAdMobAdsSdk v.6.4.1的版本。 我制作了单独的项目,将adsdk导入xamarin,添加到Metadata.xml属性。这个项目编译没有错误。但是当我从我的monodroid应用程序中引用这个项目时,我得到一个错误:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Tool exited with code: 3. Output:
UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: Java heap space
at com.android.dx.util.IntList.growIfNeeded(IntList.java:274)
at com.android.dx.util.IntList.add(IntList.java:217)
at com.android.dx.util.LabeledList.addLabelIndex(LabeledList.java:96)
at com.android.dx.util.LabeledList.set(LabeledList.java:184)
at com.android.dx.rop.code.BasicBlockList.set(BasicBlockList.java:77)
at com.android.dx.ssa.back.SsaToRop.convertBasicBlocks(SsaToRop.java:260)
at com.android.dx.ssa.back.SsaToRop.convert(SsaToRop.java:124)
at com.android.dx.ssa.back.SsaToRop.convertToRopMethod(SsaToRop.java:70)
at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:102)
at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:73)
at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:273)
at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:134)
at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:87)
at com.android.dx.command.dexer.Main.processClass(Main.java:487)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:459)
at com.android.dx.command.dexer.Main.access$400(Main.java:67)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:398)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
at com.android.dx.command.dexer.Main.processOne(Main.java:422)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:333)
at com.android.dx.command.dexer.Main.run(Main.java:209)
at com.android.dx.command.dexer.Main.main(Main.java:174)
at com.android.dx.command.Main.main(Main.java:91)
(MyMegaMonoDroidApplication)
我的错误在哪里? 日Thnx。
答案 0 :(得分:0)
请指定Java堆大小= 1G(或512M可能对您有所帮助)。
以下是如何为Xamarin Studio https://stackoverflow.com/a/24833518/883738
执行此操作在Visual Studio中,您应该在Android project properties
中执行此操作