Firebase和Google Play服务之间使用哪些依赖项?

问题描述 投票:6回答:1

我最近开始玩Firebase,但我无法完全理解它与Google Play服务的关系。我知道Firebase是一个移动平台,在Android上它基于Google Play服务,但为什么有一些模块与Google Play服务的名称相同?

例如,在我的build.gradle中,我可以:

com.google.android.gms:play-services-auth:9.4.0
com.google.android.gms:play-services-ads:9.4.0

但是也:

com.google.firebase:firebase-auth:9.4.0
com.google.firebase:firebase-ads:9.4.0

我在Firebase documentation上看到有可用组件列表(请注意,最后一个组件实际上是Google Play服务模块):

com.google.android.gms:play-services-appindexing:9.4.0

same list for Google Play Services更长,所以有些模块不能仅使用Firebase依赖项。我应该使用哪些依赖项?为什么?我可以使用混合依赖项吗?

android firebase google-play-services
1个回答
0
投票

在这个新的Firebase(从5月18日起),Google为其添加了一些现有服务。 Google Play服务已经拥有以下功能:Google Analytics,AdMob,测试实验室等。您可以在Google Developer Console中使用它们。

但随后,他们决定将其中一些功能与firebase合并。这样,您就可以在Firebase控制台上“一起”使用所有功能。它们现在统一为用户提供更好的体验,并帮助您(作为开发人员)轻松管理您的项目。

因此,如果要使用firebase,则应使用firebase依赖项。 Google Play依赖项适用于在Google Developer Console上创建的项目。

© www.soinside.com 2019 - 2024. All rights reserved.