如何确定Google服务插件,gradle插件和dart pub软件包的兼容版本 [英] How do I determine compatible version for google services plugin, gradle plugin and dart pub packages

查看:120
本文介绍了如何确定Google服务插件,gradle插件和dart pub软件包的兼容版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习颤动. "向Flutter添加Firebase "教程显示了如何使用此功能; "com.google.gms:google-services:3.2.1",但最新版本似乎是 4.2.0

I'm learning flutter. The "Adding Firebase to Flutter" tutorial shows to use this; "com.google.gms:google-services:3.2.1" but the latest version seems to be 4.2.0

此外,我想使用来自 https://pub的合适(最新的)版本的软件包. dartlang.org/packages

例如(当前): firebase_core 0.3.1 + 1和 google_sign_in 4.0.1 + 1

Such as (currently): firebase_core 0.3.1+1 and google_sign_in 4.0.1+1

如果我只选择最新的数字,则会遇到很多编译错误.

If I just choose the latest numbers I get a lot of compilation errors.

我的问题是:在哪里可以找到这些各个组件的最新支持/兼容版本号?

我发现唯一起作用的方法是使用:"com.google.gms:google-services:3.2.1",并继续降级发布包版本号,直到编译器错误消失.我觉得必须有一种更合理的方法来推断用于各个组件的正确版本号.

The only thing I have found to work is to use:"com.google.gms:google-services:3.2.1" and to just keep downgrading pub package versions numbers until the compiler errors go away. I feel like there must be a more sane way to deduce the correct version numbers to use for various components.

有人对此问题有见识吗?

Anybody have any insight into this issue?

谢谢

推荐答案

我需要查看错误消息,但这可能与AndroidX有关.如果您必须检查插件的变更日志文件(这是一种很好的做法,因为有时自述文件未更新),那么您可能会看到

I need to see error messages but it's probably about AndroidX. If you have to check the changelog files of your plugins (by the way it's a good practice since sometimes readme's are not updated), you will probably see

重大更改.从已弃用的原始Android支持库迁移到AndroidX.这不应该导致任何功能上的变化,但是如果使用原始插件的所有Android应用程序都在使用原始支持库,则该应用程序也必须进行迁移.

Breaking change. Migrate from the deprecated original Android Support Library to AndroidX. This shouldn't result in any functional changes, but it requires any Android apps using this plugin to also migrate if they're using the original support library.

google_sign_in 4.0.0更新日志

您可以通过避免AndroidX 使用列出的这些软件包,或者您可以按照这些说明迁移到AndroidX .

You can avoid AndroidX by using these packages listed or you can migrate to AndroidX with these instructions.

flutter create不是androidx附带的,它带有android支持库,但是如果您有Android Studio,则很容易迁移它.就我而言,我已经将其迁移.

flutter create is not coming with androidx, it comes with android support libraries, but if you have Android Studio, it's easy to migrate it. In my case, I've migrated it.

这篇关于如何确定Google服务插件,gradle插件和dart pub软件包的兼容版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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