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

简介: 问题发生概述:       将android程序复制运行时,报错Unable to execute dex: Multiple dex files define;Conversion to Dalvik format failed: Unable to execute dex: Multiple d...

问题发生概述:
       将android程序复制运行时,报错Unable to execute dex: Multiple dex files define;Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/kenai/jbosh/AbstractAttr;

具体解决方案如下:

方法一:
       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包中的类和包名一致,我用的是jar包中的类,所以工程中的这个类就是重复引用的,删除工程中重复引用的类后,成功打包启动。希望各位同学注意这个小问题。

目录
相关文章
JRebel-JVMTI [FATAL] Couldn‘t write to C:\Users\【完美解决方案】
JRebel-JVMTI [FATAL] Couldn‘t write to C:\Users\【完美解决方案】
JRebel-JVMTI [FATAL] Couldn‘t write to C:\Users\【完美解决方案】
|
Java 开发工具 Android开发
Android Studio 解决:error adding symbols: File in wrong format clang++.exe: error: linker command...
错误日志: Error:FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:externalNativeBuildDebug'.
6567 0
|
6月前
|
iOS开发
XCode10.2.1打开老工程报Multiple commands produce与Info.plis错误
XCode10.2.1打开老工程报Multiple commands produce与Info.plis错误
56 0
|
JavaScript
The file is in the program because: Imported via xxx Root file specified for compilation Vetur(1261)
The file is in the program because: Imported via xxx Root file specified for compilation Vetur(1261)
190 0
The file is in the program because: Imported via xxx Root file specified for compilation Vetur(1261)
cl.exe is unable to create an executable file. C compiler test failed.
cl.exe is unable to create an executable file. C compiler test failed.
198 0
cl.exe is unable to create an executable file
cl.exe is unable to create an executable file
132 0
|
Java
Cause: com.android.dex.DexException: Multiple dex files define Lcom
Cause: com.android.dex.DexException: Multiple dex files define Lcom
191 0
Cause: com.android.dex.DexException: Multiple dex files define Lcom
|
Unix Shell Linux
|
前端开发 iOS开发 移动开发
Xcode 10: Build input file double-conversion cannot be found
升级到xcode10之后 ReactNative项目启动报错如下: error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.
3279 0
|
Java Maven
Maven打包时抛出should not point at files within the project directory …异常
版权声明:本文首发 http://asing1elife.com ,转载请注明出处。 https://blog.csdn.net/asing1elife/article/details/82732113 ...
13071 0