我无法连接到Firebase仅此行实现'com.google.firebase:firebase-core:16.0.0:15.0.0'

时间:2018-10-15 13:36:57

标签: android firebase android-studio android-gradle

首先,是什么原因导致此错误?

  

实现'com.google.firebase:firebase-core:16.0.0:15.0.0'

第二,我只想知道如何解决此类问题,因为我需要将我的应用程序连接到Firebase。

Screenshot of build.gradle file When I add this Implement implementation com.google.firebase:firebase-core:16.0.4 , I lose my connection to firebase Screenshot of build.gradle file

2 个答案:

答案 0 :(得分:1)

您有两次声明的版本:15.0.0:16.0.0。 Gradle不知道那里发生了什么。改为执行以下操作:

implementation com.google.firebase:firebase-core:16.0.4

16.0.4是最新版本。

答案 1 :(得分:0)

enter image description here

我确实遇到过类似的问题,我认为以下建议可以帮助您解决问题。我从中了解到的是所有Firebase库上版本号的一致性。我将Firebase消息传递库与不同版本的核心库一起使用,但是当我按建议更改版本号时,它工作正常。