我構建了android開發環境並從android開發網站下載了android4.1-cts源代碼。但構建源代碼時出現如下錯誤:在VMware12.04上構建Android源代碼時出現錯誤
host Java:ddmlib-tests (out/host/common/obj/JAVA_LIBRARIES/ddmlib- tests_intermediates/classes)
host Java: swtmenubar (out/host/common/obj/JAVA_LIBRARIES/swtmenubar_intermediates/classes)
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Vector.<init>(Vector.java:111)
at java.util.Vector.<init>(Vector.java:124)
at org.antlr.analysis.DFA.createTransitionTableEntryForState(DFA.java:551)
at org.antlr.analysis.DFA.createStateTables(DFA.java:440)
at org.antlr.codegen.CodeGenerator.genLookaheadDecision(CodeGenerator.java:645)
at org.antlr.grammar.v3.CodeGenTreeWalker.block(CodeGenTreeWalker.java:2876)
at org.antlr.grammar.v3.CodeGenTreeWalker.rule(CodeGenTreeWalker.java:2382)
at org.antlr.grammar.v3.CodeGenTreeWalker.rules(CodeGenTreeWalker.java:1537)
at org.antlr.grammar.v3.CodeGenTreeWalker.grammarSpec(CodeGenTreeWalker.java:1441)
at org.antlr.grammar.v3.CodeGenTreeWalker.grammar_(CodeGenTreeWalker.java:461)
at org.antlr.codegen.CodeGenerator.genRecognizer(CodeGenerator.java:421)
at org.antlr.Tool.generateRecognizer(Tool.java:655)
at org.antlr.Tool.process(Tool.java:468)
at org.antlr.Tool.main(Tool.java:93)
make: *** [out/host/common/obj/JAVA_LIBRARIES/smali_intermediates/smaliLexer.java] Error 1
make: *** Waiting for unfinished jobs....
我發現了一些解決方案,例如更改java -Xms16m -Xmx1024m,但它也不起作用。 我能做什麼? 謝謝!
嘗試使用此http://www.google.com/search?#q=JAVA_LIBRARIES%2Fsmali_intermediates%2FsmaliLexer.java]+Error+1也不要忘記避開OpenJDK並使用Java 6 JDK – Ken