最近在开发一个工程,其中用到了一个开源的库项目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. centos7的安装

    初装centos7还是在九月份,那时候关于win7 下centos7硬盘安装的资料很少,现在就好多, 在这里备份下东西吧 首先是安装的时候,关于找从那个地方找image的问题. hda ,sda分别表 ...

  2. POJ 2255 Tree Recovery 二叉树恢复

    一道和Leetcode的一道题目基本上一样的题目. 给出前序遍历和中序遍历序列,要求依据这些信息恢复一颗二叉树的原貌,然后按后序遍历序列输出. Leetcode上有给出后序和中序,恢复二叉树的. 只是 ...

  3. ASP.NET 依赖注入。

    ASP.NET 依赖注入. http://www.it165.net/pro/html/201407/17685.html 我在网上看到了这篇文章,这边文章主要说的方法就是通过读取配置文件来解决依赖注 ...

  4. PHP添加Mssql/sqlserver2000扩展,适用于Php5.2/Php5.3/Php5.4

    原文:PHP添加Mssql/sqlserver2000扩展,适用于Php5.2/Php5.3/Php5.4 本文介绍如何在Windows下配置php扩展. 本文链接 http://blog.csdn. ...

  5. C语言库函数大全及应用实例七

    原文:C语言库函数大全及应用实例七 [编程资料]C语言库函数大全及应用实例七 函数名: getw 功 能: 从流中取一整数 用 法: int getw(FILE *strem); 程序例: #i nc ...

  6. c语言发挥帕斯卡三角

    我们已经确定了帕斯卡三角的规则,下面是我的代码,非常实用哦! !! #include<stdio.h>  void main()  {      int i,j,n,k;      sca ...

  7. SVN:One or more files are in a conflicted state

    解决代码冲突 如果commit时出现"You have to update your work copy first."红色警告,说明版本库中的此文件已经被其他人修改了. 请先点& ...

  8. Yii2中如何使用CodeCeption

    Yii2和CodeCeption CodeCeption是一个全栈的PHP测试框架,关于CodeCeption的介绍见:CodeCeption官方文档. Yii2官方增加了对CodeCeption的支 ...

  9. MVC+Bootstrap设计

    MVC+Bootstrap) 二 框架设计 文章目录: 一.前言 二.结构图 三.项目搭建 四.代码生成 五.实现接口 六.依赖倒置 七.登录实现 八.最后 一.前言 这个框架是从最近几年做过的项目中 ...

  10. WebStorm中Node.js项目配置教程(1)——创建项目

    Node.js绝对是一个web开发的热点话题,作为web神器的WebStorm也是开发Node.js的佼佼者. 接下来就Node.js项目在WebStorm的配置操作就行详细的讲解,首先是创建项目.两 ...