无法执行 dex:多个 dex 文件定义 [英] Unable to execute dex: Multiple dex files define

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

问题描述

我知道这个问题以前在这里被问过几次.但我还没有看到任何可能的解决方案.在我将项目作为 Android 应用程序运行"之前,如果我不清理它,我会收到以下错误并且必须重新启动 Eclipse ...并再次清理.

I know this question has been asked here a few times before. But i haven't seen any possible solution yet. Before i make the project 'Run as Android Application' , if i do not clean it, i receive the following error and have to restart Eclipse ... and clean again.

Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define
     Lcom/jstun/core/attribute/MessageAttributeInterface;

com.jstun.core... 是我的 src 文件夹的一部分,当然我不能删除它.即使我删除了那个包,另一个包也会显示为如下错误:

com.jstun.core... is a part of my src folder, of course i can't remove it. And even if i remove that package, another package will show up as an error like:

Unable to execute dex: Multiple dex files define
     Landroid/support/v4/app/ActivityCompatHoneycomb;

自从更新到 ADT 15 后,我看到了这个错误,我在 Ubuntu 上使用 Eclipse Galileo你有什么主意吗?感谢您的回复!

I've seen this error since updating to ADT 15, i'm using Eclipse Galileo on Ubuntu Do you have any idea? Thanks for any reply!

推荐答案

这是一个构建路径问题.

  • 确保您的 bin 文件夹不包含在您的构建路径中.

  • Make sure your bin folder is not included in your build path.

右键单击您的项目 ->转到属性 ->构建路径.

Right click on your project -> go to properties -> Build Path.

确保 Honeycomb 库在您的 libs/ 文件夹中,而不是在您的源文件夹中.

Make sure that Honeycomb library is in your libs/ folder and not in your source folder.

在构建路径中单独包含 libs/ 中的库.

Include the libraries in libs/ individually in the build path.

顺便说一句,您可能希望引入 android-support-v4 库以获得 Ice Cream Sandwich 支持,而不是 Honeycomb 支持库.

BTW, you may want to bring in the android-support-v4 library to get Ice Cream Sandwich support instead of the Honeycomb support library.

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

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