如何将Firebase崩溃报告升级到Firebase Crashlytics?

时间:2018-03-20 06:25:37

标签: android firebase crashlytics firebase-crash-reporting

无法构建我的项目。显示错误消息

错误:(2,0)带有id' io.fabric'的插件没找到。

错误:(62,13)无法解决:com.crashlytics.sdk.android:crashlytics:2.7.1

遵循的步骤

enter image description here

https://firebase.google.com/docs/crashlytics/upgrade-from-crash-reporting

enter image description here

https://codelabs.developers.google.com/codelabs/firebase-android/#14

如果有任何想法请分享您的想法。 提前谢谢。

2 个答案:

答案 0 :(得分:1)

对依赖进行一些改变..

申请插件:'io.fabric'

 compile 'com.google.firebase:firebase-core:11.8.0'
compile('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
    transitive = true
}
apply plugin: 'com.google.gms.google-services'

项目列表依赖

  repositories {
    maven {
        url 'https://maven.fabric.io/public'
    }
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath 'com.google.gms:google-services:3.2.0'

    classpath 'io.fabric.tools:gradle:1.25.1'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

答案 1 :(得分:0)

我遇到了同样的问题,给我错误的那一行是这个:

  

classpath'io.fabric.tools:gradle:1.24.4'

当我切换到

  

classpath'io.fabric.tools:gradle:1.25.4'

编译正确

我在这里找到了更新的代码行:

https://firebase.google.com/docs/crashlytics/get-started