问题发生概述:
程序编译正常,在用Eclipse调试执行时,报错Unable to execute dex: Multiple dex files define,因为以前也没有遇到这类错误,首先便尝试万能纠错发,如下方法一,也是上网搜索众多解决方案之一,尝试后未果,便按照搜索方案,逐一尝试,都未能解决,最后盯着工程突然发现问题。具体解决方案如下:
方法一:
Eclipse->Project->去掉Build Automatically->Clear ->Build Project->Build Automatically,关闭Eclipse,再打开(我的问题不是出在这)
方法二:
更新ADT插件,删除workspace目录下的.metadata目录,(这个解决方案没有尝试,因为在开发过程中,我只是更换了一个jar包而出现的错误,而且开发环境不能连网络,不方便尝试)
方法三:
在你的项目下某个文件夹中有一个后缀为*.APK的文件,删掉,重启Eclipse即可。(尝试未果)
方法四:
原因是有重复的。jar被引用,可以查看你的build path,尤其是Android Dependencies一定有重复引入的.jar包,解决的方法是在libs删除重复的jar即可。 (我找了半天,也没有发现重复引用的jar包,不过还是得感谢这位同学,我最终能解决问题也是受到这个方案的启发,贴上博客连接http://blog.sina.com.cn/s/blog_4b9b6ad001016uuk.html)
方法五:(成功解决方法)
在项目中,有一个类的包名和引用的jar包中的类和包名一致,我用的是jar包中的类,所以工程中的这个类就是重复引用的,删除工程中重复引用的类后,成功打包启动。希望各位同学注意这个小问题。
吃水不忘挖井人:http://blog.csdn.net/mxlxiao7/article/details/8978930
相关推荐
android引入外部jar包弹出以下错误[2020-04-23 13:08:25 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/loopj/android/http/AsyncHttpClient$1; [2020-04-23 13:08:25 - Halloworld1] ...
从commons-beanutils-1.8.3.jar中删除了org/apache/commons/collections目录及其下的类,避免了与commons-collections-3.2.jar一起在android中使用时报Andorid Unable to execute dex: Multiple dex files define错...
从commons-beanutils-1.8.3.jar中删除了org/apache/commons/collections目录及其下的类,避免了与commons-collections-3.2.jar一起在android中使用时报Andorid Unable to execute dex: Multiple dex files define错...
如果报错:Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/annotation/AnimRes;请删掉PalmCampus工程下lib包里的android-support-v4.jar】
如果报错:Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/annotation/AnimRes;请删掉PalmCampus工程下lib包里的android-support-v4.jar
用于分包,解决 android 打包时报Unable to execute dex: method ID not in [0, 0xffff]: 65536
64k的各种异常 ...Unable to execute dex: method ID not in [0, 0xffff]: 65536 或者 UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: method ID not in [0, 0xffff]: 65536 at com.
ubuntu 下vim配置,包括语法高亮,backspace。
failed to execute script 解决方案+命令行执行传参exe
init:rcS post-stop process(1160) init:rcS post-stop process(923)
qt-sql-odbc-prog-example ==================== 作者:William.L 电子邮件: SlideShare: ://www.slideshare.net/wiliwe/ 目的 示例代码:###### Linux上Qt ODBC数据库访问的使用说明######
主要介绍了详解docker中使用systemctl启动服务报错的解决办法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
在Windows平台下安装PHP后,在使用PHP的exec、shell_exec等函数时,经常会遇到报错:unable to fork...,这实际上是因为PHP对cmd.exe没有足够的权限引起的。
Python 3.85 使用pyinstaller在win10 x64下打包的应用程序,在win10 x64下运行完全正常,但是在win7 x64下则报错。failed to execute script pyi_rth_ pyi_rth_xxx 解决方法
Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project
Python 使用pyinstaller打包成exe文件后运行出现Failed to execute script ***的解决方案
List a function names to trace (supertrace dbi:execute dbi:prepare) ;; Trace all exported functions from 'dbi' package and 'dex:request' (supertrace (package dbi) dex:request) ;; Custom before/after ...
react-naitve 错误之Failed to execute aapt , react-native错误解决方案,
对于kei51出现can't execute 'CKeilC51BINA51.EXE'.txt的解决办法
主要介绍了Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1的解决办法的相关资料,需要的朋友可以参考下