在寻找上传图片的方法时,我按照以下简单说明添加了很多外部 JAR:using-multipartentity-in-android-applications
但是当我尝试共同编译代码时出现错误:
[2012-12-14 11:37:55 - Dex Loader] Unable to execute dex: Multiple dex files define Lorg/apache/http/ConnectionClosedException;
我以前从未使用过外部库。谁能告诉我如何解决这个问题?
最佳答案
可以在多个库中定义相同的类。这就是您收到此错误的原因。您需要检查哪些类重叠并通过重新组织或删除一些外部库来解决问题。
这也可能是 eclipse 问题。尝试清理您的项目。
请参阅以下主题:
Unable to execute dex: Multiple dex files define Lcom/myapp/R$array;
Unable to execute dex: Multiple dex files define
Error when building apk - "Multiple dex files define Lcom/google/ads/Ad"
关于java - android外部jar问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13877437/