安卓中运行报错Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决

安卓中运行报错Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决

原创  2017年10月27日 10:11:21
  • 3020
错误如下:Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

 

打开project目录,我的app中自带有android_support_v7.xml,表明它是支持v7的,这是默认的,肯定有

 


我又在build.gradle中再次配置了android_support_v7(重复导入v7包了)。

 

解决办法:

将libs中的v7包删除,重新clean一下,run运行一下 ,就可以了~~

问题解决了,总结就是一定有重复的引用library或者jar包。

 

猜你喜欢

转载自hypercube.iteye.com/blog/2400587