【问题标题】:The library com.google.firebase:firebase-analytics is being requested by various other libraries库 com.google.firebase:firebase-analytics 正在被其他各种库请求
【发布时间】:2018-06-29 19:33:12
【问题描述】:

更新 Firebase 库时出现此错误:

正在请求库 com.google.firebase:firebase-analytics 由 [[15.0.1,16.0.0), [16.0.1,16.0.1] 的其他各种库, [16.0.1,99999]],但解析为 16.0.1。禁用插件并检查 你的依赖树使用 ./gradlew :app:dependencies。

依赖项是:

implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.1.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-appindexing:16.0.1'
implementation 'com.google.firebase:firebase-crash:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.2'
implementation 'com.google.firebase:firebase-invites:16.0.1'
implementation 'com.google.firebase:firebase-config:16.0.0'
implementation 'com.google.firebase:firebase-ads:15.0.1'
implementation 'com.google.firebase:firebase-firestore:17.0.2'

有没有找到正确配置的简单方法? 如果没有,要禁用什么插件以及如何禁用?如果我只是运行任务,我会得到同样的错误。

更新: 我认为这种依赖关系与它有关,因为如果禁用它会插入依赖任务运行:

implementation 'com.google.android.gms:play-services-auth:15.0.1'

【问题讨论】:

  • 看看this post
  • 与该版本对齐仍然无法修复。我使用其他也绑定到旧版本的库。
  • 你使用classpath 'com.google.gms:google-services:4.0.1吗? (在您的项目 build.gradle 文件中)
  • 如果更新类路径也可以。如果您想发布作为答案,我会接受。
  • 所有依赖项现在都是最新版本,完全没有问题。

标签: android firebase android-gradle-plugin


【解决方案1】:

尝试使用以下步骤:

  • 更新您的实施版本(有关最新的 Firebase 版本,请参阅发行说明 https://firebase.google.com/support/release-notes/android
  • 使用最新的 google-services 版本更新您的项目 build.gradle 文件(目前为 classpath 'com.google.gms:google-services:4.0.1

或见this similar post

【讨论】:

    猜你喜欢
    • 2019-01-21
    • 1970-01-01
    • 2018-11-07
    • 1970-01-01
    • 2019-06-20
    • 1970-01-01
    • 1970-01-01
    • 2019-08-13
    相关资源
    最近更新 更多