关于异常Dex Loader:Unable to execute dex: Multiple dex files的处理

来源:互联网 发布:linux 系统log 编辑:程序博客网 时间:2024/05/22 13:17

转自:http://www.chenwg.com/android/unable-to-execute-dex-multiple-dex-files-define-landroid%E9%94%99%E8%AF%AF%E8%A7%A3%E5%86%B3.html

今天在使用actionbarsherlock的时候,新建一个项目,然后运行的时候出现以下错误:

[2013-04-08 11:47:39 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatAccessibilityServiceInfoVersionImpl;[2013040811:47:39ActionBarsTest]ConversiontoDalvikformatfailed:Unabletoexecutedex:MultipledexfilesdefineLandroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatAccessibilityServiceInfoVersionImpl;
[2013-04-08 11:49:45 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatAccessibilityServiceInfoVersionImpl;[2013040811:49:45ActionBarsTest]ConversiontoDalvikformatfailed:Unabletoexecutedex:MultipledexfilesdefineLandroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatAccessibilityServiceInfoVersionImpl;
[2013-04-08 11:50:37 - ActionBarsTest] Found 2 versions of android-support-v4.jar in the dependency list,
[2013-04-08 11:50:37 - ActionBarsTest] but not all the versions are identical (check is based on SHA-1 only at this time).
[2013-04-08 11:50:37 - ActionBarsTest] All versions of the libraries must be the same at this time.
[2013-04-08 11:50:37 - ActionBarsTest] Versions found are:
[2013-04-08 11:50:37 - ActionBarsTest] Path: F:\android\source\20130407\threemaincomponent\workplace\ActionBarsTest\libs\android-support-v4.jar
[2013-04-08 11:50:37 - ActionBarsTest] Length: 385685
[2013-04-08 11:50:37 - ActionBarsTest] SHA-1: 48c94ae70fa65718b382098237806a5909bb096e
[2013-04-08 11:50:37 - ActionBarsTest] Path: F:\android\source\20130407\threemaincomponent\JakeWharton-ActionBarSherlock-e5c2d1c\library\libs\android-support-v4.jar
[2013-04-08 11:50:37 - ActionBarsTest] Length: 271754
[2013-04-08 11:50:37 - ActionBarsTest] SHA-1: 53307dc2bd2b69fd5533458ee11885f55807de4b
[2013-04-08 11:50:37 - ActionBarsTest] Jar mismatch! Fix your dependencies

解决方法是将ActionBarsTest项目的android-support-v4.jar删掉,然后使用actionbarsherlock的android-support-v4.jar

0 0