我正在研究一个在构建服务器上使用ant编译的Android项目。 它有几个库项目。自Android sdk更新以来,没有构建工作。 它带来了以下错误
请查看下面的日志
[dex] Converting compiled files and external libraries into <project>/bin/classes.dex...
INFO -
[dx] UNEXPECTED TOP-LEVEL EXCEPTION:
[dx] java.lang.ArrayIndexOutOfBoundsException: 3158
[dx] at com.android.dx.merge.IndexMap.adjustString(IndexMap.java:112)
[dx] at com.android.dx.merge.IndexMap.adjust(IndexMap.java:212)
[dx] at com.android.dx.merge.DexMerger$7.read(DexMerger.java:505)
[dx] at com.android.dx.merge.DexMerger$7.read(DexMerger.java:499)
[dx] at com.android.dx.merge.DexMerger$IdMerger.readUnsortedValues(DexMerger.java:333)
[dx] at com.android.dx.merge.DexMerger$IdMerger.mergeUnsorted(DexMerger.java:302)
[dx] at com.android.dx.merge.DexMerger.mergeAnnotations(DexMerger.java:499)
[dx] at com.android.dx.merge.DexMerger.mergeDexBuffers(DexMerger.java:166)
[dx] at com.android.dx.merge.DexMerger.merge(DexMerger.java:186)
[dx] at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:300)
[dx] at com.android.dx.command.dexer.Main.run(Main.java:232)
[dx] at com.android.dx.command.dexer.Main.main(Main.java:174)
[dx] at com.android.dx.command.Main.main(Main.java:91)
感谢任何帮助。
答案 0 :(得分:2)
这是 Android SDK 的问题。
解决方法是在dex.disable.merger=true
project.properties