所有 firebase 库必须高于或低于 14.0.0

新手上路,请多包涵

我检查了我的应用程序 build.gradle 文件,这些是其中与 firebase 相关的唯一行

/***
 * Firebase
 */
implementation 'com.google.firebase:firebase-core:15.0.0'
implementation 'com.google.firebase:firebase-messaging:15.0.0'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
    transitive = true
}
implementation 'com.google.firebase:firebase-ads:15.0.0'

我没有任何使用 firebase 的库,所以我认为使用旧版本的库不会有问题。

问题是我无法使用新的 v15 版本的 firebase 构建 gradle、清理项目或重建项目,因为它不断抛出错误 All firebase libraries must be either above or below 14.0.0

原文由 Jude Fernandes 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 346
2 个回答
apply plugin: 'com.google.gms.google-services'

把它放在这条线下面。

 apply plugin: 'com.android.application'

它对我有用。

原文由 Ahmet Şimşek 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题