最近在开发一个工程,其中用到了一个开源的库项目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. Iframe父页面与子页面之间的调用

    原文:Iframe父页面与子页面之间的调用 Iframe父页面与子页面之间的调用 专业词语解释如下:     Iframe:iframe元素是文档中的文档.     window对象: 浏览器会在其打 ...

  2. POJ 2492 并查集应用的扩展

    A Bug's Life Time Limit: 10000MS Memory Limit: 65536K Total Submissions: 28651 Accepted: 9331 Descri ...

  3. 超酷的jQuery百叶窗图片滑块实现教程

    原文:超酷的jQuery百叶窗图片滑块实现教程 今天我们要来分享一款基于jQuery的百叶窗焦点图插件,也可以说是图片滑块插件.这种jQuery焦点图插件的应用非常广泛,在早些年前,我们需要用flas ...

  4. high performance program (SSE4.2 intrin instruction)

    In file included from mm_lddqu.si128.c:2:0: /usr/local/lib/gcc/x86_64-redhat-linux/4.7.1/include/nmm ...

  5. NHibernate系列

    NHibernate系列 写在前面 这篇总结本来是昨天要写的,可昨天大学班长来视察工作,多喝了点,回来就倒头就睡了,也就把这篇总结的文章拖到了今天. nhibernate系列从开始着手写,到现在前后耗 ...

  6. OSG(OpenSceneGraphcow.osg)配置笔记

    OpenSceneGraph是一款高性能的3D图形开发库.广泛应用在可视化仿真.游戏.虚拟现实.高端技术研发以及建模等领域.使用标准的C++和OpenGL编写而成,可以运行在Windows系列.OSX ...

  7. C# 编译器选项 /platform(指定输出平台)32位程序运行到x64平台的问题

    如果说你编译的exe运行时报错: “尝试读取或写入受保护的内存.这通常指示其他内存已损坏” 这很有可能是你是以非托管的方式错误地引用了64位的API中去. 为什么会这样? 那你就要考虑VS的编译器选项 ...

  8. RPC服务的发布订阅实现Thrift

    Thrift 个人实战--RPC服务的发布订阅实现(基于Zookeeper服务) 前言: Thrift作为Facebook开源的RPC框架, 通过IDL中间语言, 并借助代码生成引擎生成各种主流语言的 ...

  9. linux find命令之exec

    find是我们很常用的一个Linux命令,但是我们一般查找出来的并不仅仅是看看而已,还会有进一步的操作,这个时候exec的作用就显现出来了. exec解释: -exec  参数后面跟的是command ...

  10. USBWebserver v8.6 PHP环境

    USBWebserver v8.6 Welcome on usbwebserver.com/net/eu USBWebserver v8.6 New in this version New langu ...