Ant 求助 ant 命令编译报错

q2323e472q · 发布于 2016年2月24日 · 303 次阅读
96

[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

共收到 2 条回复
4
laofo · #1 · 2016年2月26日

[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]

96
yuipr · #2 · 2016年6月26日

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

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册