[英]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.