我有一个包含大量代码和第三方库的Android Build。构建在下面给出了着名的错误(对许多函数/字段)。
我知道使用Gradle构建时有一个解决方案,但我们仍在使用ant。我们还有一些原因无法切换到Gradle。有没有人知道用ant解决这个问题?
[dx] UNEXPECTED TOP-LEVEL EXCEPTION:
[dx] com.android.dex.DexIndexOverflowException: field ID not in [0, 0xffff]: 65536
[dx] at com.android.dx.merge.DexMerger$5.updateIndex(DexMerger.java:479)
[dx] at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:277)
[dx] at com.android.dx.merge.DexMerger.mergeFieldIds(DexMerger.java:468)
[dx] at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:167)
[dx] at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
[dx] at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
[dx] at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
[dx] at com.android.dx.command.dexer.Main.run(Main.java:246)
[dx] at com.android.dx.command.dexer.Main.main(Main.java:215)
[dx] at com.android.dx.command.Main.main(Main.java:106)