💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## com.android.dex.DexException: Multiple dex files define 完整的log如下: ~~~ Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: /opt/sdk/build-tools/21.1.2/dx --dex --no-optimize --output /home/linc/workspace/xxx/app/build/intermediates/dex/debug --input-list=/home/linc/workspace/xxx/app/build/intermediates/tmp/dex/debug/inputList.txt Error Code: 2 Output: UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lorg/kobjects/base64/Base64; at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596) at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554) at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535) at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171) at com.android.dx.merge.DexMerger.merge(DexMerger.java:189) at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303) at com.android.dx.command.dexer.Main.run(Main.java:246) at com.android.dx.command.dexer.Main.main(Main.java:215) at com.android.dx.command.Main.main(Main.java:106) ~~~ 原来还是因ksoap2-android而起。我在上一文中修改了这个jar包并重命名,并将原jar包从目录中删除,编译通过。问题出现在今天的更新代码后,原来我没有将自己的更改提交,update后又把原来的jar包down下来了。所以两个jar包内容就出现了冲突造成了此编译错误。  将更新下来的jar删掉就可以了。