转换为Dalvik格式失败:无法执行dex:定义了多个dex文件 [英] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files are defined
问题描述
运行时出现错误,提示:"DraggableGridViewSample]转换为Dalvik格式失败:无法执行dex:多个dex文件定义了Lcom/animoto/android/views/DraggableGridView $ 1;"
I'm getting an error at runtime stating: "DraggableGridViewSample] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/animoto/android/views/DraggableGridView$1;"
如何避免这种情况?我试过从我的libs文件夹中删除android-support-v4 jar,然后单击Android工具>添加Android支持库,但是我似乎无法解决此问题.
How might this be avoided? I've tried removing the android-support-v4 jar from my libs folder and clicking Android Tools > Add Android Support Library but I cannot seem to resolve this issue.
任何建议都将不胜感激.
Any suggestions are greatly appreciated.
推荐答案
查看您提供的源, DraggableGridView
类已经在 src
下.因此,添加包含相同内容的jar是多余的,dex会抱怨重复的定义.
Looking at the source you provided, the DraggableGridView
class is already under src
. So adding the jar that contains the same is redundant and dex will complain about duplicate definitions.
要修复此问题,只需从项目中删除 DraggableGridView.jar
.
To fix it, just remove the DraggableGridView.jar
from your project.
这篇关于转换为Dalvik格式失败:无法执行dex:定义了多个dex文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!