Ant 求助 ant 命令编译报错

971218286@qq.com · 2016年02月24日 · 1 次阅读

[dex] Converting compiled files and external libraries into D:\Jenkins\job s\P603Xuan-Android\workspace\bin\classes.dex... [dx] [dx] UNEXPECTED TOP-LEVEL ERROR: [dx] java.lang.OutOfMemoryError: Java heap space [dx] at java.util.Arrays.copyOf(Arrays.java:2271) [dx] at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:113) [dx] at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93) [dx] at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:140) [dx] at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:278) [dx] at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPath Opener.java:166) [dx] at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpe ner.java:144) [dx] at com.android.dx.command.dexer.Main.processOne(Main.java:596) [dx] at com.android.dx.command.dexer.Main.processAllFiles(Main.java:4 98) [dx] at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264) [dx] at com.android.dx.command.dexer.Main.run(Main.java:230) [dx] at com.android.dx.command.dexer.Main.main(Main.java:199) [dx] at com.android.dx.command.Main.main(Main.java:103)

BUILD FAILED F:\Eclipse-New\Android Developer Tools\sdk\tools\ant\build.xml:894: The followin g error occurred while executing this line: F:\Eclipse-New\Android Developer Tools\sdk\tools\ant\build.xml:896: The followin g error occurred while executing this line: F:\Eclipse-New\Android Developer Tools\sdk\tools\ant\build.xml:908: The followin g error occurred while executing this line: F:\Eclipse-New\Android Developer Tools\sdk\tools\ant\build.xml:283: null returne d: 3

Total time: 1 minute 39 seconds

以尝试修改 ant.bat 和 build.xml 添加 fork 属性 windows 版 64 位 win7 系统 8G 内存(两条 4G)apache-ant-1.9.6

[dex] Converting compiled files and external libraries into D:\Jenkins\job s\P603Xuan-Android\workspace\bin\classes.dex... [dx] [dx] UNEXPECTED TOP-LEVEL ERROR: [dx] [color=DarkRed] java.lang.OutOfMemoryError: Java heap space[b][/b]

这是代码的问题吧,找开发解决啊

需要 登录 后方可回复。