最近在开发一个工程,其中用到了一个开源的库项目Android-ViewPagerIndicator。

这个项目是作为一个库出现的,如下图:

这个项目中包含了android-support-v4.jar

然后另外一个项目里面把引用了这个Library,如下图:

然后编译这个项目,就会出现标题中所描述的错误,也就是包重复。

由于这个项目本身并没有android-support-v4.jar这个包,但是将第一个项目加做库文件之后这个项目里面就出现了这个android-support-v4.jar。

解决方法:

1.先将这个项目引用第一个项目作为library取消,就是把上图的那个条目remove掉,然后refresh这个项目。

2.将第一个库项目做如下设置,前提要保证adt的版本足够高:

主要是将android private libraries这个选项去掉,这样引用这个项目的其他项目就不会将这个项目的pirvate libraries加到自己的依赖里面。

3.重新将自己的项目设置为依赖这个库项目,编译,通过,运行。ok

[Android开发常见问题-11] Unable to execute dex: Multiple dex files define 解决方法的更多相关文章

  1. eclipse:运行 Android 项目时出现 “Unable to execute dex: Multiple dex files define” 解决方法

    android 项目在eclipse 出现Unable to execute dex: Multiple dex files define Conversion to Dalvik format fa ...

  2. Unable to execute dex: Multiple dex files define 解决方法

    程序编译正常,在用Eclipse调试执行时,报错Unable to execute dex: Multiple dex files define: 方法:      原因是有重复的.jar被引用,可以 ...

  3. Unable to execute dex:Multuple dex files define 解决方法

    困扰我两天的问题终于解决了,在网上查的方法无非有三种 一. Eclipse->Project->去掉Build Automatically->Clear ->Build Pro ...

  4. 转:Unable to execute dex: Multiple dex files define 解决方法

    转自:http://blog.csdn.net/mxlxiao7/article/details/8978930 问题发生概述: 程序编译正常,在用Eclipse调试执行时,报错Unable to e ...

  5. Eclipse下Android开发错误之Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace

    升级了Android版本后,在运行应用时提示: [2013-11-27 10:37:35 - Dex Loader] Unable to execute dex: java.nio.BufferOve ...

  6. 用Eclipse运行Android版APP(PhoneGap)时出现:Unable to execute dex: Multiple dex files define

    这两天遇到点小问题,做个记录: 症状:运行,调试时都报:Unable to execute dex: Multiple dex files define错误,发布后的APP安装到手机后一运行,就提示: ...

  7. Android - Unable to execute dex: Multiple dex files define

    这种提示的意思是说,引用的文件重复了.在引用json解析库中,clean工程的时候,报错说: Unable to execute dex: Multiple dex files define Lorg ...

  8. Unable to execute dex: Multiple dex files define Lcom/gl

    [2015-04-16 17:42:04 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/gl/softphon ...

  9. 导入项目时,有关[2016-04-03 20:38:02 - Dex Loader] Unable to execute dex: Multiple dex files 问题

    最近我在学习androidUI设计,在网上找了一个UI菜单界面开源代码示例,按照步骤导入项目,运行的时候控制台结果报了如下错误: [2016-04-03 20:38:02 - Dex Loader] ...

随机推荐

  1. C# 带滚动栏的Label控件

    C# 带滚动栏的Label控件,用鼠标选的时候还是有点闪烁: namespace 带滚动栏的Label控件 { public class TextBoxLabel : System.Windows.F ...

  2. 序列化悍将Protobuf-Net

    序列化悍将Protobuf-Net,入门动手实录 最近在研究web api 2,看了一篇文章,讲解如何提升性能的, 在序列化速度的跑分中,Protobuf一骑绝尘,序列化速度快,性能强,体积小,所以打 ...

  3. YII编码规范

    类名称: 驼峰式 首字母大字 class PointController class PointRatioController 公共成员方法: 驼峰式 首字母小写 public function ge ...

  4. SQL点滴1—SET QUOTED_IDENTIFIER OFF语句的作用

    原文:SQL点滴1-SET QUOTED_IDENTIFIER OFF语句的作用 先看下面几个sql语句 代码   SELECT * FROM [USER]    WHERE a= 'netasp' ...

  5. VS2015集成新潮工具4

    VS2015集成新潮工具(四)   本课程来源与微软connect视频教程,Modern Web Tooling in Visual Studio 2015 本课程主要讲下当下流行的前端工具 bowe ...

  6. 单极型ADC如何测量负电压?

    最常用的方法是使用一个运放做成加法器将负电压抬到0V以上,如果这样的输出超过了最大输出电压那么再使用比例衰减就可以办到了. 参考下面的讨论: http://www.amobbs.com/thread- ...

  7. leetco Path Sum II

    和上一题类似,这里是要记录每条路径并返回结果. Given the below binary tree and sum = 22, 5 / \ 4 8 / / \ 11 13 4 / \ / \ 7 ...

  8. .NET MVC4 实训记录之二(扩展WebSecurity模型下的UserProfile表)

    使用VS2013创建MVC4项目后,自动生成的代码中默认使用WebSecurity模型创建用户管理,生成以下数据库:

  9. WCF连接被意外关闭

    WCF项目中出现常见错误的解决方法:基础连接已经关闭: 连接被意外关闭 在我们开发WCF项目的时候,常常会碰到一些莫名其妙的错误,有时候如果根据它的错误提示信息,一般很难定位到具体的问题所在,而由于W ...

  10. String的使用

    String的常用方法 方法 说明 Anchor() 创建html锚 Concat() 把字符串连接起来 indexOf() 查找字符出现的位置 lastIndexOf() 查找最后出现字符 char ...