问题描述
- android failed for task ':app:dexDebug'
- 我使用SVN更新了项目后出现这个错误,貌似是更新了包,我用的是V7包,别人用的是V4,怎么改可以正常运行呀?最好项目以后更新也不会出现这个问题
Error:Execution failed for task ':app:dexDebug'.com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:UsersAdministratorAppDataLocalAndroidsdkbuild-tools21.1.2dx.bat --dex --no-optimize --output D:android-studioexerciseex05svn_androidStuidoappbuildintermediatesdexdebug --input-list=D:android-studioexerciseex05svn_androidStuidoappbuildintermediatestmpdexdebuginputList.txt
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatIcs;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
解决方案
参考以下链接
http://my.oschina.net/deepSprings/blog/371646
解决方案二:
http://bbs.csdn.net/topics/391006536