Firebase和Google Play服务之间使用哪些依赖关系? [英] Which dependencies to use between Firebase and Google Play Services?

查看:148
本文介绍了Firebase和Google Play服务之间使用哪些依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始使用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文档上看到有可用组件列表(并注意到最后一个实际上是一个Google Play服务模块):

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

相同Google Play服务列表的时间要长得多,所以有些模块不能仅使用Firebase依赖项。我应该使用哪些依赖性,为什么?我可以使用混合依赖吗?

解决方案

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

一些与火力基地功能。这样,您可以在Firebase控制台上将所有功能结合在一起。他们现在统一起来,为用户提供更好的体验,并帮助您(作为开发人员)轻松管理您的项目。

所以,如果您想使用Firebase,那么您应该使用Firebase依赖关系。 Google Play依存关系适用于在Google Developer Console上创建的项目。


I recently started playing with Firebase, but I cannot completely understand its relation with Google Play Services. I know that Firebase is a mobile platform, and on Android it is based on Google Play Services, but why there are some modules with the same name of the ones of Google Play Services?

For example, in my build.gradle I can have:

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

but also:

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

I see that on Firebase documentation there is the list of available components (and note that the last one is actually a Google Play Services module):

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

The same list for Google Play Services is much longer, so some modules are not available using only Firebase dependencies. Which dependencies should I use and why? Can I use mixed dependencies?

解决方案

On this new Firebase (from May 18th), Google added a few existing services to it. Google Play Services already had features like: Analytics, AdMob, Test Lab, etc. And you could use them from your Google Developer Console.

But then, they decided to merge some of those features with firebase. This way, you can have all of the features "together" on your Firebase Console. They are now unified to give your users a better experience and to help you (as a developer) easily manage your project.

So, if you want to use firebase, you should use the firebase dependencies. The Google play dependencies are meant for projects created on the Google Developer Console.

这篇关于Firebase和Google Play服务之间使用哪些依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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