android报错Error:Execution failed for task ':transformClassesWithJarMergingForDebug'.

Error:Execution failed for task ':transformClassesWithJarMergingForDebug'.

> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/ColorRes.class

这个主要是因为在项目中引入了重复的第三方库导致,这里的第三方库就是 support 的 v4库,解决方案,

在build.gradle中添加如下配置: configurations { all*.exclude group: 'com.android.support', module: 'support-v4' }

你可能感兴趣的:(android报错Error:Execution failed for task ':transformClassesWithJarMergingForDebug'.)