Cannot resolve error in Firebase Chat application

烂漫一生 提交于 2020-01-07 04:47:11

问题


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'

回答1:


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 version 10.2.0. A version of FirebaseUI for Firebase libs 10.2.4 and 10.2.6 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 or 10.2.6, but may encounter the same problem you are seeing now.



来源:https://stackoverflow.com/questions/44059878/cannot-resolve-error-in-firebase-chat-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!