转换为Dalvik格式失败:无法执行dex:定义了多个dex文件 [英] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files are defined

查看:85
本文介绍了转换为Dalvik格式失败:无法执行dex:定义了多个dex文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行时出现错误,提示:"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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆