简体   繁体   English

在Flutter应用中通过Firebase进行身份验证时,最低需要哪些Google Play服务API?

[英]Which of the Google Play Services APIs are minimally required for authenticating through Firebase in a Flutter app?

Firebase in the docs for flutter says one should put the whole of google services into the dependencies. 扑扑文档中的Firebase说,应该将整个google服务放入依赖项中。

dependencies {
        // ...
        classpath 'com.google.gms:google-services:3.2.1'   // new
}

As others suggested ( https://stackoverflow.com/a/39513236/5369792 ) this is not good practice as it bloats the app because it downloads all of the APIs. 正如其他人建议的那样( https://stackoverflow.com/a/39513236/5369792 ),这不是一个好习惯,因为它会使应用程序the肿,因为它会下载所有API。 Most of which are unnecessary and and leading to requiring Multidex even for a minimal 'hello world' app with user login. 其中大多数都是不必要的,甚至对于具有用户登录名的最小“ hello world”应用程序,甚至都需要Multidex。

Google Play Services has many APIs as per https://developers.google.com/android/guides/setup They are all downloaded by the above dependency requirement merely because Firebase wants to read google services json file. Google Play服务按照https://developers.google.com/android/guides/setup提供了许多API,它们都是根据上述依赖项要求下载的,仅是因为Firebase希望读取google services json文件。

It would be much more efficient to add just a specific dependency that Firebase actually needs. 仅添加Firebase实际需要的特定依赖项会更加有效。 So the question is which dependency(-ies) Firebase needs for a minimal user authentication and to just read the google services json file? 因此,问题是Firebase需要最小化用户身份验证并仅读取google services json文件需要哪个依赖项?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 哪些 Firebase 服务需要在 Android 上使用 Google Play 服务? - Which firebase services require google play services on Android? Firebase和Google Play服务之间使用哪些依赖项? - Which dependencies to use between Firebase and Google Play Services? 如何在Android Studio中显示用于Google Play Services API和Firebase API的API javadoc而不是没有文档的反编译类? - How to make API javadocs for Google Play Services APIs and Firebase APIs show up in Android Studio rather than decompiled classes with no docs? 如何在firebase应用中查看google play服务的版本 - How to check version of google play services in firebase app 如何知道在 Flutter 应用程序中使用哪个版本的 Google Firebase 插件? - How to know which version of Google Firebase plugin to use in Flutter app? Firebase身份验证错误-“更新Google Play服务” - firebase authentication error - “update google play services” 添加 firebase 与 google play 服务冲突 - Adding firebase is conflicting with google play services android 工作室中的 Google Play 服务错误 firebase - Google play services error firebase in android studio 具有Google Play服务的Firebase分析已过时 - Firebase analytics with Google Play Services outdated Firebase w /旧版Google Play服务 - Firebase w/ Older Google Play Services
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM