【问题标题】:firebase and com.google.android.gmsfirebase 和 com.google.android.gms
【发布时间】:2017-06-09 11:01:31
【问题描述】:

我刚刚为我的 Android 应用添加了 Firebase 支持。起初它工作得很好。但是,为了跟踪堆栈跟踪,我在app/gradle.build 中添加了以下内容:

compile 'com.google.firebase:firebase-crash:10.2.6'

现在看起来像这样:

dependencies {

    compile 'com.google.firebase:firebase-core:11.0.0'
    compile 'com.google.firebase:firebase-crash:10.2.6'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
}

apply plugin: 'com.google.gms.google-services'

但是,当我现在想启动我的应用时,我收到以下错误消息:

Error:Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.0.0.

我首先在 SDK 管理器中检查了所有内容都是最新的,它是:

由于它不起作用,我尝试像这样手动添加所需的依赖项:

compile 'com.google.gms:google-services:3.1.0'

也没有用。我在这里做错了什么?

【问题讨论】:

    标签: android firebase google-play-services


    【解决方案1】:

    确保以下依赖项使用相同的版本。

    compile 'com.google.firebase:firebase-core:11.0.0'
    compile 'com.google.firebase:firebase-crash:10.2.6'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-11-24
      • 2013-02-24
      • 1970-01-01
      • 2019-02-12
      • 2013-04-06
      • 2019-09-02
      • 2018-03-06
      • 1970-01-01
      相关资源
      最近更新 更多