获取重复条目java.util.zip.ZipException:重复条目:

时间:2017-09-25 12:09:32

标签: android android-studio gradle

如果我将内部通信库添加到我的gradle中,我在运行时会收到重复输入问题。

这是我的全部应用程序gradle

 apply plugin: 'com.android.application'

  android {
compileSdkVersion 26
buildToolsVersion '26.0.0'
useLibrary 'org.apache.http.legacy'
defaultConfig {
    lintOptions {
        abortOnError false
        disable "ResourceType"
        checkReleaseBuilds false
    }
    ndk {
        abiFilters "armeabi", "armeabi-v7a","x86"
    }
    applicationId "com.sample.activities"
    minSdkVersion 19
    targetSdkVersion 26
    multiDexEnabled true
}
dexOptions {

    javaMaxHeapSize "4g"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

productFlavors {
    with_ImageProcessor {
    }
    without_ImageProcessor {

    }
}

}
 configurations {
}






dependencies {
compile 'com.google.android.gms:play-services-base:11.0.1'

compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.viewpagerindicator:library:2.4.1@aar'


configurations {
    all*.exclude group: 'org.hamcrest', module: 'hamcrest-core'
}


compile 'com.android.support:multidex:1.0.1'

compile 'com.google.android.gms:play-services-gcm:11.0.1'
compile 'com.google.android.gms:play-services-location:11.0.1'
compile 'com.google.firebase:firebase-appindexing:11.0.1'

compile 'com.android.support:design:26.0.1'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.android.support:support-v13:26.0.2'


//for intercom

compile 'io.intercom.android:intercom-sdk-fcm:4.+'


compile 'com.google.firebase:firebase-auth:11.0.1'

compile 'com.google.android.gms:play-services-auth:11.0.1'
compile 'com.google.firebase:firebase-database:11.0.1'
compile 'com.google.firebase:firebase-messaging:11.0.1'
compile 'com.uncopt:android.justified:1.0'

compile 'com.google.firebase:firebase-invites:11.0.1'


   }
   apply plugin: 'com.google.gms.google-services'

我在这个问题上添加了这一行

 compile 'io.intercom.android:intercom-sdk-fcm:4.+'

这是我正在运行的运行时错误

错误:任务执行失败':waleteros:transformClassesWithJarMergingForWith_ImageProcessorDebug'。 > com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com / google / android / gms / internal / zzbax.class

请帮我解决此问题

1 个答案:

答案 0 :(得分:2)

尝试添加以下版本的内部通信库,而不是您正在使用的版本:

 compile 'io.intercom.android:intercom-sdk-fcm:4.0.0'

OR

 compile 'io.intercom.android:intercom-sdk-fcm:4.0.4'