简体   繁体   English

多个dex文件错误

[英]Multiple dex files error

Hi i am trying to execute an android app in emulator but i am getting the following error. 嗨,我想在模拟器中执行一个Android应用程序,但我收到以下错误。

[2013-01-31 11:19:21 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/google/android/imageloader/BitmapCache;
[2013-01-31 11:19:21 - LoginActivity] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/google/android/imageloader/BitmapCache;

I tried all the steps in this link but it hasnt hepled me. 我尝试了这个链接中的所有步骤,但它并没有让我感到困惑。

Hi i think you have two copies of the jar files even i had the same issue i had two copies ie; 嗨,我认为你有两个jar文件的副本,即使我有同样的问题,我有两个副本,即; one copy in the libs folder and another in the drawable folder now delete the extra copy in the drawable folder and clean build the project and it'll work... libs文件夹中的一个副本和drawable文件夹中的另一个副本现在删除drawable文件夹中的额外副本并清理构建项目,它将工作...

I updated eclipse (Help->Check for updates) today (31st january,2013) and now I don't see the error. 我今天(2013年1月31日)更新了eclipse(帮助 - >检查更新),现在我没有看到错误。 Before it I had error "Unable to execute dex: Multiple dex files define". 在它之前我有错误“无法执行dex:多个dex文件定义”。 Hope this helps. 希望这可以帮助。

Or 要么

Try the Below 1 试试下面的1

here is a file in bin/dexedLibs The same file exists in libs 这是bin / dexedLibs中的文件libs中存在相同的文件

Delete it in libs and it should work. 在libs中删除它,它应该工作。

For me it was the android-support-v4.jar. 对我来说这是android-support-v4.jar。

Hope this helps 希望这可以帮助

This occurs when you have multiple copies of the same class in your build path, or elsewhere in your setup. 当您在构建路径中或设置中的其他位置具有同一类的多个副本时,会发生这种情况。

For me, this occurred when I had added android-support-v4.jar to my libs/ folder, and somehow eclipse added a second copy to bin/classes/android-support-v4.jar. 对我来说,这发生在我将android-support-v4.jar添加到我的libs /文件夹时,并且不知何故eclipse在bin / classes / android-support-v4.jar中添加了第二个副本。

Deleting the extra copy in bin/classes solved the problem - unsure why Eclipse made a copy there. 删除bin / classes中的额外副本解决了这个问题 - 不确定为什么Eclipse在那里制作副本。

You can test for this with 你可以测试一下

grep -r YourOffendingClassName YourApp | grep -r YourOffendingClassName YourApp | grep jar grep jar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM