gpt4 book ai didi

java - 用于调试的 Jar 合并与 android 抛出重复条目?

转载 作者:太空宇宙 更新时间:2023-11-03 13:17:36 24 4
gpt4 key购买 nike

我在尝试运行我的构建时遇到此错误:

    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'
}

这是我的库的图片

enter image description here

我希望这里有人可以帮助我找出问题所在。我正在使用 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
}

关于java - 用于调试的 Jar 合并与 android 抛出重复条目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33487780/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com