[Android开发常见问题-11] Unable to execute dex: Multiple dex files define 解决方法
最近在开发一个工程,其中用到了一个开源的库项目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 解决方法的更多相关文章
- 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 ...
- Unable to execute dex: Multiple dex files define 解决方法
程序编译正常,在用Eclipse调试执行时,报错Unable to execute dex: Multiple dex files define: 方法: 原因是有重复的.jar被引用,可以 ...
- Unable to execute dex:Multuple dex files define 解决方法
困扰我两天的问题终于解决了,在网上查的方法无非有三种 一. Eclipse->Project->去掉Build Automatically->Clear ->Build Pro ...
- 转:Unable to execute dex: Multiple dex files define 解决方法
转自:http://blog.csdn.net/mxlxiao7/article/details/8978930 问题发生概述: 程序编译正常,在用Eclipse调试执行时,报错Unable to e ...
- 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 ...
- 用Eclipse运行Android版APP(PhoneGap)时出现:Unable to execute dex: Multiple dex files define
这两天遇到点小问题,做个记录: 症状:运行,调试时都报:Unable to execute dex: Multiple dex files define错误,发布后的APP安装到手机后一运行,就提示: ...
- Android - Unable to execute dex: Multiple dex files define
这种提示的意思是说,引用的文件重复了.在引用json解析库中,clean工程的时候,报错说: Unable to execute dex: Multiple dex files define Lorg ...
- 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 ...
- 导入项目时,有关[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] ...
随机推荐
- 批处理命令篇--配置免安装mysql 5.6.22, 以及1067错误的一个解决方法
mysql 服务启动出现1067错误的一个解决方法: 当服务启动出现1067错误时,可查看“windows 事件查看器”,发现类似错误提示 Can't find messagefile 'F:\ ...
- LeetCode——Longest Palindromic Substring
Given a string S, find the longest palindromic substring in S. You may assume that the maximum lengt ...
- JUnit4教程-高速入口
前言 大学刚学java当听说JUnit该,单元测试框架,使用非常简单的测试框架,JUnit测试测试框架将更加方便,easy.编写測试代码也是简单.明了,功能强大.今天我给大家简单分享一下最新JUnit ...
- 快速构建Windows 8风格应用33-构建锁屏提醒
原文:快速构建Windows 8风格应用33-构建锁屏提醒 引言 Windows Phone(8&7.5)和Windows 8引入了锁屏概念,其实做过Windows Phone 7.5应用开发 ...
- Keil中使用Astyel进行C语言的格式化
Astyel !E --style=linux --delete-empty-lines --indent=spaces=2 --break-blocks 这可以做到, 使用Linux风格的代码 ) ...
- JS中的模块规范(CommonJS,AMD,CMD)
JS中的模块规范(CommonJS,AMD,CMD) 如果你听过js模块化这个东西,那么你就应该听过或CommonJS或AMD甚至是CMD这些规范咯,我也听过,但之前也真的是听听而已. 现在就看看吧, ...
- IIS 5.x/6.0/7.0 和 ASP.NET
原文:IIS 5.x/6.0/7.0 和 ASP.NET 本文主要介绍 3 个主要的 IIS 版本各自对 Web 请求的不同处理方式. 本文内容 IIS 5.x 和 ASP.NET IIS 6.0 和 ...
- ubuntu下的词典的安装
因为从事开发,安装一个词典是很有必要,文中介绍安装openyoudao和stardic两个软件的方法 一.openyoudao的安装 因为是由window转来学ubuntu的,所以总是想安装和wind ...
- jquery背景动画插件使用
在网页制作动画特效的时候,有时候想通过背景插入图片,然后通过控制背景显示的位置来实现一些动画效果,这样就不用使用绝对定位控制left和top来实现动画效果!但是jquery本身的动画函数是不支持背景动 ...
- 【转】怎么导出jar包
如何导出jar包 右键工程->Export->Java->JAR file->Next-> Next 选中工程和工程中你要打包的内容,如果是Android的项目,需要把M ...