How do I determine compatible version for google services plugin, gradle plugin and dart pub packages

久未见 提交于 2019-12-13 04:28:15

问题


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

Also, I'd like to use suitable (latest?) version of packages from https://pub.dartlang.org/packages

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.

My Questions is: where can I find the latest supports/compatible version numbers for these various components?

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?

Thanks


回答1:


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

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 changelog

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

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.



来源:https://stackoverflow.com/questions/55133446/how-do-i-determine-compatible-version-for-google-services-plugin-gradle-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!