我在尝试运行构建时收到此错误:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.> com.android.build.transform.api.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/AnimatorRes.class
这是我的build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile('com.digits.sdk.android:digits:1.9.0@aar') {
transitive = true;
}
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.+'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'me.zhanghai.android.materialprogressbar:library:1.0.2'
compile 'com.android.support:support-v4:23.1.0'
compile 'com.google.android.gms:play-services-identity:8.1.0'
compile 'com.google.android.gms:play-services-plus:8.1.0'
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
compile 'com.anjlab.android.iab.v3:library:1.0.+@aar'
}
这是我的肖像
我希望这里有人可以帮助我找出问题所在.我正在使用android studio.
解决方法:
请尝试排除support-v4,因为google-play-services已包含support-v4
compile ('com.google.android.gms:play-services:8.1.0')
{
exclude group: 'com.android.support', module: 'support-v4'
}
如果不起作用,
清理项目并重建它.
否则,请尝试在gradle文件中设置multiDexEnabled
defaultConfig {
multiDexEnabled true
}