firebase - 在 Flutter 应用中通过 Firebase 进行身份验证最少需要哪些 Google Play 服务 API?
问题描述
Flutter 文档中的 Firebase 表示应该将整个 google 服务放入依赖项中。
dependencies {
// ...
classpath 'com.google.gms:google-services:3.2.1' // new
}
正如其他人所建议的那样(https://stackoverflow.com/a/39513236/5369792),这不是一个好的做法,因为它会下载所有 API,因为它会使应用程序膨胀。其中大部分是不必要的,并且导致即使对于具有用户登录的最小“hello world”应用程序也需要 Multidex。
Google Play Services 根据https://developers.google.com/android/guides/setup有很多 API,它们都是通过上述依赖要求下载的,仅仅是因为 Firebase 想要读取 google services json 文件。
仅添加 Firebase 实际需要的特定依赖项会更有效。所以问题是 Firebase 需要哪个依赖项(-ies)来进行最少的用户身份验证并只读取 google 服务 json 文件?
解决方案
推荐阅读
- c# - 使用 openxml 将图像插入 docx 会从标题中删除图像
- python - 如何在 Stripe 内循环
- ios - Swift Combine:未知属性“ObservedObject”错误
- .net - 自定义授权属性未命中断点
- ruby-on-rails - 如何解决'[emerg] host not found in upstream' nginx 问题?
- sql - SQL 嵌套/子查询和 SQL 产生相同的结果。为什么使用嵌套/子查询?
- jfrog-xray - JFrog 返回未发现违规
- python - Elasticsearch dsl q('match', path = ) 做什么?
- python - 熊猫:欺骗外连接
- php - 如何使用 jQuery 或 Ajax 在迭代期间显示 foreach 循环响应