Muhilan Muhilan -4 years ago 136
Android Question

Cannot resolve error in Firebase Chat application

Im trying chat application using firebase. Im getting following error which could nit resolve myself,

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.


com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzble.class


I have mentioned below my gradle file

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.firebase:firebase-core:10.2.4'

compile 'com.android.support:design:25.3.1'
compile 'com.firebaseui:firebase-ui:1.1.1'

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

testCompile 'junit:junit:4.12'
}


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

Answer Source

FirebaseUI has transitive dependencies on a number of the Firebase libraries. You must specify a version of FirebaseUI that is compatible with the Firebase libraries you are using. The table of compatible versions is listed in the FirebaseUI documentation. The most recent FirebaseUI version is 1.2.0, which works with library versions 10.2.0. A version of FirebaseUI for Firebase libs 10.2.4 has not been released.

The safe change is:

compile 'com.firebaseui:firebase-ui:1.2.0'
compile 'com.google.firebase:firebase-auth:10.2.0'

You could try 1.2.0 with 10.2.4, but may encounter the same problem you are seeing now.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download