在编译android2.3的工程时遇到错误
UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.HashSet.<init>(HashSet.java:125)
at com.android.dx.dex.code.StdCatchBuilder.getCatchTypes(StdCatchBuilder.java:97)
at com.android.dx.dex.code.DalvCode.getCatchTypes(DalvCode.java:166)
at com.android.dx.dex.file.CodeItem.addContents(CodeItem.java:126)
at com.android.dx.dex.file.MixedItemSection.prepare0(MixedItemSection.java:280)
at com.android.dx.dex.file.Section.prepare(Section.java:214)
at com.android.dx.dex.file.DexFile.toDex0(DexFile.java:486)
at com.android.dx.dex.file.DexFile.toDex(DexFile.java:196)
at com.android.dx.command.dexer.Main.writeDex(Main.java:427)
at com.android.dx.command.dexer.Main.run(Main.java:180)
at com.android.dx.command.dexer.Main.main(Main.java:157)
at com.android.dx.command.Main.main(Main.java:89)
make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/noproguard.classes-with-local.dex] Error 3
编译环境为ubuntu10.10在网上搜索了一下解决方法
二、解释:
JDK6新增错误类型。当GC为释放很小空间占用大量时间时抛出。
一般是因为堆太小。导致异常的原因:没有足够的内存。三、解决方案:
1、查看系统是否有使用大内存的代码或死循环。
2、可以添加JVM的启动参数来限制使用内存:-XX:-UseGCOverheadLimit
但是不知道如何去添加JVM启动参数
哪位大虾能指点一下,给一个详细的流程。PS:相同的代码,在另一台配置一样的机器上可以编译通过,见鬼了..
在线等
UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.HashSet.<init>(HashSet.java:125)
at com.android.dx.dex.code.StdCatchBuilder.getCatchTypes(StdCatchBuilder.java:97)
at com.android.dx.dex.code.DalvCode.getCatchTypes(DalvCode.java:166)
at com.android.dx.dex.file.CodeItem.addContents(CodeItem.java:126)
at com.android.dx.dex.file.MixedItemSection.prepare0(MixedItemSection.java:280)
at com.android.dx.dex.file.Section.prepare(Section.java:214)
at com.android.dx.dex.file.DexFile.toDex0(DexFile.java:486)
at com.android.dx.dex.file.DexFile.toDex(DexFile.java:196)
at com.android.dx.command.dexer.Main.writeDex(Main.java:427)
at com.android.dx.command.dexer.Main.run(Main.java:180)
at com.android.dx.command.dexer.Main.main(Main.java:157)
at com.android.dx.command.Main.main(Main.java:89)
make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/noproguard.classes-with-local.dex] Error 3
编译环境为ubuntu10.10在网上搜索了一下解决方法
二、解释:
JDK6新增错误类型。当GC为释放很小空间占用大量时间时抛出。
一般是因为堆太小。导致异常的原因:没有足够的内存。三、解决方案:
1、查看系统是否有使用大内存的代码或死循环。
2、可以添加JVM的启动参数来限制使用内存:-XX:-UseGCOverheadLimit
但是不知道如何去添加JVM启动参数
哪位大虾能指点一下,给一个详细的流程。PS:相同的代码,在另一台配置一样的机器上可以编译通过,见鬼了..
在线等
解决方案 »
- Unable to read workbench state. Workbench UI layout will be reset.
- ANDROID 增强现实 AR Augmented Reality
- 请教一下我这种情况是自学好呢,还是去上培训班比较好
- android ScrollView 中一个 TextView 显示
- 如何获取android1.5完整代码
- 肿么办……关于activity
- 从SD卡中取图片放到res中,并写进xml,怎么做啊求助!
- 大神们,这个怎么解析啊
- ProgressDialog添加一个取消键,点击后停止加载
- Android问题
- 短信中信息列表的焦点问题
- android 环境搭建问题
Copying: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar
Copying: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-names.jar
Copying: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar
target Dex: frameworkUNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: Java heap space
at com.android.dx.ssa.SetFactory.makeInterferenceSet(SetFactory.java:79)
at com.android.dx.ssa.back.InterferenceGraph.<init>(InterferenceGraph.java:53)
at com.android.dx.ssa.back.LivenessAnalyzer.constructInterferenceGraph(LivenessAnalyzer.java:91)
at com.android.dx.ssa.back.SsaToRop.<init>(SsaToRop.java:89)
at com.android.dx.ssa.back.SsaToRop.convertToRopMethod(SsaToRop.java:76)
at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:103)
at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:74)
at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:269)
at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:131)
at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:85)
at com.android.dx.command.dexer.Main.processClass(Main.java:299)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:278)
at com.android.dx.command.dexer.Main.access$100(Main.java:56)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:229)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
at com.android.dx.command.dexer.Main.processOne(Main.java:247)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:183)
at com.android.dx.command.dexer.Main.run(Main.java:139)
at com.android.dx.command.dexer.Main.main(Main.java:120)
at com.android.dx.command.Main.main(Main.java:89)
make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.dex] Error 3我这个是2.2的代码,编译环境为ubuntu10.04-64bit,4G物理内存。在别的同样的系统上可以编译通过...
这个我在dx和dx.bat中都设置过,还是不行
个人感觉应该跟用哪个JDK没有关系。
用这个还是不行,提示Error occurred during initialization of VM
Too small initial heap