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

Nav*_*aur 5 android firebase crashlytics firebase-crash-reporting

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

错误:(2,0)找不到ID为'io.fabric'的插件.

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

遵循的步骤

在此输入图像描述

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

在此输入图像描述

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

如果有人有任何想法,请分享您的想法.提前致谢.

小智 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'
Run Code Online (Sandbox Code Playgroud)

项目层依赖

  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
}
Run Code Online (Sandbox Code Playgroud)