我在尝试升级插件时遇到这样的错误。我尝试了很多bu无法修复此问题。
摇篮:
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:[email protected]
-- Project 'app' depends onto com.google.android.gms:[email protected]
-- Project 'app' depends onto com.google.firebase:[email protected]
-- Project 'app' depends onto com.google.android.gms:[email protected]
-- Project 'app' depends onto com.google.firebase:[email protected]
-- Project 'app' depends onto com.google.android.gms:[email protected]
-- Project 'app' depends onto com.google.android.gms:[email protected]
-- Project 'app' depends onto com.google.firebase:[email protected]
-- Project 'app' depends onto com.google.android.gms:[email protected]
-- Project 'app' depends onto com.google.android.gms:[email protected]
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
请让我知道确切的问题是什么
如firebase文档中明确提到的。
configuration.implementation'com.google.firebase:firebase-core:16.0.7'
正在证明谷歌分析
我们建议从com.google.firebase:firebase-core开始,它提供Google Analytics for Firebase功能。
而且您还在使用。
configuration.implementation'com.google.android.gms:play-services-analytics:16.0.6'
这是造成该问题的原因。两者都使用google analytic。因此,您应该使用任何一个来分析您的应用程序。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句