这是重复类的屏幕截图当我开始集成 Digits 时,每次在 Marshmallow 之前的设备上构建应用程序时,我都必须升级 Crashlytics
错误:任务“:app:transformClassesWithJarMergingForDebug”执行失败。
com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com/crashlytics/android/answers/shim/AnswersKitEventLogger.class
搜索了一段时间后,我已经尝试了 ./gradlew clean 命令,我发现有两个具有相同名称的类 ANswersKitEventLooger.class 其中一个在 Crashlytics 的 answers-shim-0.0.3 库下,另一个在答案下分支库中的 shim-0.0.4
我也尝试在 build.gradel 中排除,但到目前为止似乎没有任何效果`
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 15
targetSdkVersion 22
// Enabling multidex support.
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: 'Parse-*.jar')
compile 'com.android.support:support-v4:22.0.0'
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.google.android.gms:play-services:7.5.0'
compile 'com.facebook.android:facebook-android-sdk:4.8.0+'
compile 'com.xgc1986.android:parallaxpagertransformer:1.0.3'
compile 'com.facebook.rebound:rebound:0.3.7'
compile 'com.ogaclejapan.smarttablayout:library:1.1.3@aar'
compile files('libs/AudienceNetwork.jar')
compile files('libs/android-async-http-1.4.4.jar')
compile files('libs/ebizu-redemption.jar')
compile files('libs/universal-image-loader-1.9.1.jar')
compile files('libs/zxing-core.jar')
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.github.ksoichiro:android-observablescrollview:1.5.0'
compile 'com.github.siyamed:android-shape-imageview:0.9.+@aar'
compile 'io.branch.sdk.android:library:1.+'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.daimajia.easing:library:1.0.1@aar'
compile 'com.daimajia.androidanimations:library:1.1.3@aar'
compile 'com.android.support:multidex:1.0.1'
compile('com.crashlytics.sdk.android:crashlytics:2.6.0@aar') {
transitive = true;
}
compile('com.digits.sdk.android:digits:1.11.1@aar') {
transitive = true;
}
}
`