Search code examples
androidfirebaseandroid-studiofirebase-authenticationfirebaseui

TransformException : java.util.zip.ZipException: duplicate entry: com/google/android/gms/auth/api/signin/zze.class


After updating the Firebase SDK to 11.8.0, I am getting that error.Please help me in resolving this.

buildscript {
    repositories {
        jcenter()
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'android-apt'



repositories {
    jcenter()
    maven { url 'https://maven.fabric.io/public' }
    maven { url "https://jitpack.io" }
}

dependencies {
    compile('com.github.ozodrukh:CircularReveal:1.3.1@aar') {
        transitive = true;
    }
}



android {
    signingConfigs {
        config {
            keyAlias 'crm'
            keyPassword 'autobiz'
            storeFile file('D:/LatestProjects/LatestProjects/WyzProjects/WyzProjects/WYZCRM/wyzcrmKeystore/Keystore/WYZCRM.jks')
            storePassword 'autobiz'
        }
    }
    compileSdkVersion 25
    buildToolsVersion '25.0.0'
    defaultConfig {
        applicationId "com.wyzcrm9013.wyzcrmapp"
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 2
        versionName "1.5"

    }
    buildTypes {
        debug {
            debuggable = true as BuildType
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            debuggable false
            signingConfig signingConfigs.config


        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE-FIREBASE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/maven/commons-io/commons-io/pom.xml'
        exclude 'META-INF/maven/commons-io/commons-io/pom.properties'
    }


dependencies {

    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'

    compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
        transitive = true;
    }

    compile('com.digits.sdk.android:digits:1.9.4@aar') {
        transitive = true;
    }

    compile 'com.android.support:appcompat-v7:25.1.1'
    compile 'com.google.firebase:firebase-database:11.8.0'
    compile 'com.android.support:design:25.1.1'
    compile 'com.android.support:recyclerview-v7:25.1.1'
    compile 'com.android.support:cardview-v7:25.1.1'
    compile 'com.google.firebase:firebase-auth:11.8.0'
    compile 'com.android.support:support-v4:25.1.1'
    compile 'com.afollestad.material-dialogs:core:0.9.0.1'
    compile 'org.apache.commons:commons-io:1.3.2'
    compile 'com.github.mahmed8003:DroidValidatorLight:1.0.0'
    compile 'com.google.android.gms:play-services-location:11.8.0'
    compile 'com.google.android.gms:play-services-gcm:11.8.0'
    compile 'com.google.firebase:firebase-messaging:11.8.0'
    compile 'com.github.ybq:Android-SpinKit:1.1.0'
    compile 'com.jakewharton:butterknife:8.1.0'
    apt 'com.jakewharton:butterknife-compiler:8.1.0'
    compile 'com.sdsmdg.tastytoast:tastytoast:0.1.1'
    compile 'com.squareup.okhttp3:logging-interceptor:3.4.0'
    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    compile 'com.squareup.retrofit2:converter-gson:2.1.0'
    compile 'com.squareup:otto:1.3.8'
    compile 'com.google.code.gson:gson:2.6.2'
    compile 'com.google.firebase:firebase-storage:11.8.0'
    compile 'com.firebase:digitsmigrationhelpers:0.1.1'
    compile 'com.firebaseui:firebase-ui-auth:2.0.0'
    compile 'com.firebaseui:firebase-ui:0.4.4'
    compile 'com.hbb20:ccp:1.7.2'

    //compile 'com.google.android.gms:play-services-appindexing:11.8.0'
}
apply plugin: 'com.google.gms.google-services'

Let me know any changes need to be made. Prior to this I used 11.4.2 version, and it worked fine in all the devices. The device which has Google play services with the version 11.9.52, this Am not getting FCM token.


Solution

  • Change this:

     compile 'com.firebaseui:firebase-ui-auth:2.0.0'
     compile 'com.firebaseui:firebase-ui:0.4.4' 
    

    to this:

     compile 'com.firebaseui:firebase-ui-auth:3.2.1'
     compile 'com.firebaseui:firebase-ui:3.2.1'
    

    FirebaseUI Compatibility with Firebase/google play services