(转载)Unable to execute dex: Multiple dex files define Landroid错误解决

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

[2013-04-08 11:47:39 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
[2013-04-08 11:47:39 - ActionBarsTest] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
[2013-04-08 11:49:45 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
[2013-04-08 11:49:45 - ActionBarsTest] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
[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

========================================

其实这个错误的发生,就是在安卓开发的时候,内部重复添加了两次的android-support..jar包,故内部会有冲突。所以只要删除期中之一即可




你可能感兴趣的:((转载)Unable to execute dex: Multiple dex files define Landroid错误解决)