【问题标题】:ERROR: In project 'app' a resolved Google Play services library dependency depends on another错误:在项目“应用程序”中,已解决的 Google Play 服务库依赖项依赖于另一个
【发布时间】:2019-07-16 04:55:46
【问题描述】:

当我尝试升级我的插件时遇到这样的错误。我尝试了很多 bu 无法解决这个问题。

Gradle:

private static void googleAndFirebase(configuration) {
//gcm
configuration.implementation 'com.google.android.gms:play-services-gcm:16.0.0'

//Firebase libs
configuration.implementation 'com.google.firebase:firebase-core:16.0.7'
configuration.implementation 'com.google.firebase:firebase-auth:16.1.0'
configuration.implementation 'com.google.firebase:firebase-database:16.0.6'
configuration.implementation 'com.google.firebase:firebase-messaging:17.3.4'

//lib for map
configuration.implementation 'com.google.android.gms:play-services-maps:16.0.0'
configuration.implementation 'com.google.android.gms:play-services-location:16.0.0'

//google analytics
configuration.implementation 'com.google.android.gms:play-services-analytics:16.0.6'

//map utils
configuration.implementation 'com.google.maps.android:android-maps-utils:0.5' 
}

错误:

ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[16.0.
5]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

Dependency failing: com.google.android.gms:play-services-analytics-impl:16.0.6 -> com.google.android.gms:play-services-m
easurement-base@[16.0.5], but play-services-measurement-base version was 16.3.0.

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.firebase:firebase-measurement-connector-impl@17.0.5
-- Project 'app' depends onto com.google.android.gms:play-services-analytics@16.0.6
-- Project 'app' depends onto com.google.firebase:firebase-analytics-impl@16.3.0
-- Project 'app' depends onto com.google.android.gms:play-services-tagmanager-v4-impl@16.0.6
-- Project 'app' depends onto com.google.firebase:firebase-analytics@16.3.0
-- Project 'app' depends onto com.google.android.gms:play-services-measurement-base@16.0.5
-- Project 'app' depends onto com.google.android.gms:play-services-analytics-impl@16.0.6
-- Project 'app' depends onto com.google.firebase:firebase-core@16.0.7
-- Project 'app' depends onto com.google.android.gms:play-services-measurement-base@16.3.0
-- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@16.3.0

For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file

我已经尝试了here提到的解决方案,但我的问题没有解决。

请告诉我具体的问题是什么

【问题讨论】:

    标签: android firebase gradle google-play-services


    【解决方案1】:

    正如 firebase 文档中明确提到的那样。

    配置.实现 'com.google.firebase:firebase-core:16.0.7'

    正在证明谷歌分析

    我们建议从 com.google.firebase:firebase-core 开始,它 提供 Google Analytics for Firebase 功能。

    而且你也在使用 .

    配置.实现 'com.google.android.gms:play-services-analytics:16.0.6'

    这是导致该问题的原因。两者都使用谷歌分析。因此,您应该使用任何一种来分析您的应用程序。

    【讨论】:

      猜你喜欢
      • 2019-09-09
      • 2019-07-03
      • 2019-05-31
      • 2023-04-02
      • 2020-08-24
      • 2020-04-17
      • 1970-01-01
      • 1970-01-01
      • 2017-05-14
      相关资源
      最近更新 更多