无法解决Firebase聊天应用程序中的错误 [英] Cannot resolve error in Firebase Chat application

查看:153
本文介绍了无法解决Firebase聊天应用程序中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试着使用Firebase聊天应用程序。我得到下面的错误,可能无法解决自己,

错误:执行失败的任务':应用程序:transformClassesWithJarMergingForDebug'。


com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com / google / android / gms / internal / zzble.class


我在下面提到我的gradle文件

 依赖关系{
编译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'c​​om.android.support:appcompat-v7:25.3.1'
编译'com.google.firebase:firebase-core:10.2.4'

编译'com.android.support:design:25.3.1'
compile'c​​om。 firebaseui:firebase-ui:1.1.1'

compile'c​​om.google.firebase:firebase-auth:10.2.4

testCompile'junit:junit:4.12'
}


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


解决方案

FirebaseUI对许多Firebase库具有传递依赖性。您必须指定一个与您正在使用的Firebase库兼容的FirebaseUI版本。兼容版本的表格列在 FirebaseUI文档。最新的FirebaseUI版本是1.2.0,它适用于库版本10.2.0。 FirebaseUI for Firebase libs 10.2.4和10.2.6版本尚未发布。
$ b

安全更改为:

pre编译com.firebaseui: b

您可以使用10.2.4或10.2.6来尝试1.2.0,但可能会遇到同样的问题现在。


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'

解决方案

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.

这篇关于无法解决Firebase聊天应用程序中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆