当我像这样设置gradle文件时,一切都正常:
dependencies {
implementation 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.android.support:support-v4:22.2.1'
}
apply plugin: 'com.google.gms.google-services'
但是,当我交换依赖项和插件时,会出现以下错误:
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.android.support:support-v4:22.2.1'
}
所有gms/firebase库必须使用完全相同的版本
规范(混合版本可能导致运行时崩溃)。建立
版本9.0.0、11.0.4。示例包括
com。谷歌。安卓gms:游戏服务基础:9.0.0和
com。谷歌。安卓gms:游戏服务地下室:11.0.4
gradle结构中是否有任何优先级,以及这与版本的关系?是
com.google.gms.google-services
所有版本的通用语法,如果不是,我应该如何在这里自定义其版本?