【问题标题】:Could not find com.google.firebase:firebase-crashlytics-gradle:17.0.0-beta01找不到 com.google.firebase:firebase-crashlytics-gradle:17.0.0-beta01
【发布时间】:2020-01-17 17:17:24
【问题描述】:

我正在尝试实施新的 Firebase-Crashlytics SDK。浏览文档后,我收到以下错误。

找不到 com.google.firebase:firebase-crashlytics-gradle:17.0.0-beta01。

【问题讨论】:

    标签: firebase crashlytics-android


    【解决方案1】:

    我发现了以下内容。

    错误:com.google.firebase:firebase-crashlytics-gradle:17.0.0-beta01。

    正确:'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta01'

    【讨论】:

    • 不错的收获!您可能希望将此情况报告给 Firebase 团队,并请求更新他们的文档。
    • 非常感谢!伟大的发现节省了我的时间:)
    • 感谢您的提示。
    • 感谢您报告此事。版本号错误的文档将很快得到纠正。
    【解决方案2】:

    要实现新的 Firebase Crashlytics SDK,您需要添加 firebase-crashlytics-gradle 类路径和 firebase-crashlytics 依赖项。

    在您的项目级 build.gradle 文件中,添加 Crashlytics Gradle 插件:

    buildscript {
        repositories {
            // Check that you have Google's Maven repository (if not, add it).
            google()
        }
    
        dependencies {
            // ...
    
            // Check that you have the Google Services Gradle plugin v4.3.2 or later
            // (if not, add it).
            classpath 'com.google.gms:google-services:4.3.3'
    
            // Add the Crashlytics Gradle plugin.
            classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta02'
        }
    }
    
    allprojects {
        repositories {
            // Check that you have Google's Maven repository (if not, add it).
            google()
        }
    }
    

    在您的应用级 build.gradle 文件中,应用 Crashlytics Gradle 插件:

    apply plugin: 'com.android.application'
    
    apply plugin: 'com.google.gms.google-services' // Google Services Gradle plugin
    
    // Apply the Crashlytics Gradle plugin
    apply plugin: 'com.google.firebase.crashlytics'
    

    在您的应用级 build.gradle 中,为 Google Analytics 和 Crashlytics 添加依赖项。

    dependencies {
        // Recommended: Add the Firebase SDK for Google Analytics.
        implementation 'com.google.firebase:firebase-analytics:17.2.2'
    
        // Add the Firebase SDK for Crashlytics.
        implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta01'
    }
    

    来自here

    如果您要从 Fabric 迁移,请不要忘记更新 google-services.json(从您的 Firebase 控制台下载)。迁移后可能会发生变化。迁移描述为here

    附:未来奋斗者的答案。

    【讨论】:

      猜你喜欢
      • 2021-02-15
      • 1970-01-01
      • 2019-03-25
      • 1970-01-01
      • 2021-07-17
      • 2017-02-19
      • 2016-11-12
      • 2020-07-27
      • 2018-10-15
      相关资源
      最近更新 更多