无法执行dex:多个dex文件定义了Lcom/myapp/R$array; [英] Unable to execute dex: Multiple dex files define Lcom/myapp/R$array;

查看:49
本文介绍了无法执行dex:多个dex文件定义了Lcom/myapp/R$array;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从更新到 ADT 14 后,我无法再构建我的项目.它在更新之前构建良好.

Since updating to ADT 14 I can no longer build my project. It was building fine prior to updating.

错误:

[2011-10-23 16:23:29 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/myapp/R$array;
[2011-10-23 16:23:29 - myProj] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/myapp/R$array;

已经报告了类似的问题,我已经尝试了那里的建议,包括

Similar issues have been reported and I have tried the suggestions there including

  • 重新启动 Eclipse.
  • 清理项目并重建 - 禁用项目->自动构建"选项,然后清理"和构建"项目,然后尝试运行.将自动构建"选项重置为开启
  • 重新安装 Android 开发者工具
  • 重新安装 Eclipse(更新到最新版本 3.7.1)
  • 创建了一个从文件系统导入的新项目
  • 从 Subversion 创建了一个新项目.

推荐答案

我遇到了同样的问题,很奇怪,因为它只在使用 Eclipse 时发生(但用 Ant 没问题).这是我修复它的方式:

I had the same problem, quite weird because it was happening only when using Eclipse (but it was OK with Ant). This is how I fixed it:

  • 右键单击项目名称
  • 选择构建路径 -> 配置构建路径
  • Java Build Path中,转到标签Order and Export

取消选中您的 .jar

只是有时:在 Order 和 Export 选项卡中,我没有任何 jar 库,所以我没有选中 Android Private Libraries 项目.现在我的项目正在运行.

Only sometimes: In Order and Export tab I did not have any jar library there, so I have unchecked Android Private Libraries item. Now my project is running.

这篇关于无法执行dex:多个dex文件定义了Lcom/myapp/R$array;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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