【问题标题】:Version conflict in gradle filegradle 文件中的版本冲突
【发布时间】:2018-05-15 15:59:05
【问题描述】:

这太可悲了。

implementation 'com.google.android.gms:play-services-location:15.0.1' // Error
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-places:15.0.1'
implementation 'com.google.firebase:firebase-messaging:15.0.2'

这行implementation 'com.google.android.gms:play-services-location:15.0.1' 导致错误。

错误:任务 ':app:processDebugGoogleServices' 执行失败。 请通过更新 google-services 插件的版本(有关最新版本的信息可在 https://bintray.com/android/android-tools/com.google.gms.google-services/ 获得)或将 com.google.android.gms 的版本更新到 15.0.1 来修复版本冲突。

它来自谷歌吗?

【问题讨论】:

  • 请添加您的项目级gradle
  • 我认为在您的项目级 gradle 中添加 classpath 'com.google.gms:google-services:3.3.0' 将解决您的问题

标签: android android-gradle-plugin


【解决方案1】:

更新google play services gradle插件版本:

classpath 'com.google.gms:google-services:3.3.1'

【讨论】:

  • 我也有这个问题。我已经使用了 services 3.3.1,但仍然出现错误。有时它可以工作,但是当我添加一个完全不相关的库(例如 compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.22.5')时,它会停止工作并再次抛出异常。
【解决方案2】:

确保在 gradle build/app 文件的底部应用插件“com.google.gms.google-services”。

而不是(也)在顶部。 在我的情况下,firebase-plugin 崩溃了,但很好地在文件顶部应用了插件......

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-11-03
    • 2016-12-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-02
    相关资源
    最近更新 更多