简体   繁体   English

Crashlytics Fabric.io 已弃用

[英]Crashlytics Fabric.io deprecated

Does anyone know what the proper way to implement Crash report using Firebase in Android application?有谁知道在Android应用程序中使用Firebase实现Crash report的正确方法是什么?

I have read Firebase crashlytics doc in that mention implement Fabric.io .我已经阅读了Firebase crashlytics文档中提到的实施Fabric.io Fabric.io is deprecate and in there document mention removed fabric.io dependency. Fabric.io已弃用,并且在那里的文档中提到删除了fabric.io依赖项。

Firebase https://firebase.google.com/docs/crashlytics/get-started?platform=android Firebase https://firebase.google.com/docs/crashlytics/get-started?platform=android

在此处输入图片说明

Fabric.io reference https://docs.fabric.io/android/examples/sampleapp/index.html Fabric.io reference https://docs.fabric.io/android/examples/sampleapp/index.html

在此处输入图片说明

Without fabric.io dependency I am getting below error没有fabric.io依赖,我得到以下错误

java.lang.RuntimeException: Unable to get provider com.crashlytics.android.CrashlyticsInitProvider: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: The Crashlytics build ID is missing. java.lang.RuntimeException:无法获取提供程序 com.crashlytics.android.CrashlyticsInitProvider:io.fabric.sdk.android.services.concurrency.UnmetDependencyException:缺少 Crashlytics 构建 ID。 This occurs when Crashlytics tooling is absent from your app's build configuration.当您的应用程序的构建配置中缺少 Crashlytics 工具时,就会发生这种情况。 Please review Crashlytics onboarding instructions and ensure you have a valid Crashlytics account.`请查看 Crashlytics 入门说明并确保您拥有有效的 Crashlytics 帐户。`

Note: Please compare the steps in both reference, I have go through all the links but didn't find the proper way that's why I am asking here.注意:请比较两个参考中的步骤,我已经浏览了所有链接,但没有找到正确的方法,这就是我在这里问的原因。

I am sure no 1 go through the links, that's why getting down vote great.我确定没有人通过链接,这就是为什么投票很棒。 I have attached the Firebase and Fabric.io document steps screen我附上了 Firebase 和 Fabric.io 文档步骤屏幕

Late post迟到的帖子

Here is the solution, first of all remove all the fabric.io related reference and code.这里是解决方案,首先删除所有fabric.io相关的参考和代码。

In the main gradle.build project level在主 gradle.build 项目级别

buildscript {
  ext.kotlin_version = '1.4.0'
  repositories {
    google()
    jcenter()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:4.0.2'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

    // Add this line
    classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
  }
}

Next, in the build.gradle app level接下来,在 build.gradle 应用程序级别

apply plugin: 'com.google.firebase.crashlytics' // add this line at top

and in the dependency area并在依赖区域

dependencies {
 implementation 'com.google.firebase:firebase-crashlytics:17.2.2' // add this line
}

If you really want to remove the Fabric SDK from your app and use the Firebase SDK, Follow the Upgrade to the Firebase Crashlytics SDK如果您真的想从您的应用中删除 Fabric SDK 并使用 Firebase SDK,请按照升级到 Firebase Crashlytics SDK

This guide describes how to upgrade to the new SDK from the Fabric Crashlytics SDK.本指南介绍了如何从 Fabric Crashlytics SDK 升级到新的 SDK。 It describes the changes that come with the new APIs, the reason for the changes, and how to update your code, if required.它描述了新 API 带来的更改、更改的原因以及如何更新代码(如果需要)。

docs.fabric.io you can get the following information, So I don't know why you have so many down votes, this is a legit question IMHO. docs.fabric.io你可以获得以下信息,所以我不知道你为什么有这么多反对票,恕我直言,这是一个合法的问题。 Maybe because you didn't do this research yourself which I just did here.也许是因为你没有自己做这项研究,而我只是在这里做的。

You can continue using the Fabric Crashlytics SDK in your apps until a deprecation date is announced.在宣布弃用日期之前,您可以继续在您的应用中使用 Fabric Crashlytics SDK。 Once the Fabric Crashlytics SDK deprecation date is announced you will need to upgrade to the new Firebase Crashlytics SDK.宣布 Fabric Crashlytics SDK 弃用日期后,您将需要升级到新的 Firebase Crashlytics SDK。 Old versions of your app still using the Fabric Crashlytics SDK will not break once it's deprecated, however they will no longer submit crash reports.仍然使用 Fabric Crashlytics SDK 的旧版本应用在弃用后不会中断,但它们将不再提交崩溃报告。

But it seems like it will just continue to work as per normal after this date until further notice.但在此日期之后,它似乎将继续正常工作,直至另行通知。 Just leave it the way it is.就这样吧。

Are you talking about this?你在说这个吗?

apply plugin: 'io.fabric'

According to the documentation in here ,根据此处的文档,

Crashlytics has been integrated into Firebase, with new Firebase-only features. Crashlytics 已集成到 Firebase 中,并提供了仅限 Firebase 的新功能。 New apps should use Crashlytics in Firebase to get access to the latest updates and features.新应用应使用 Firebase 中的 Crashlytics 来访问最新的更新和功能。 Fabric Crashlytics and the Fabric dashboard will be available until March 31, 2020 for existing users. Fabric Crashlytics 和 Fabric 仪表板将在 2020 年 3 月 31 日之前为现有用户提供。

My guess is that, it might be - Let's call it grace period ;) up until every other user migrates it and they migrate every other tool from Fabric.我的猜测是,它可能是 - 让我们称之为宽限期 ;) 直到每个其他用户迁移它并且他们从Fabric迁移所有其他工具

By the end of March 31, 2020 everything related to Fabric might be removed.到 2020 年 3 月 31 日,与 Fabric 相关的所有内容都可能会被删除。 Hope I answered what you were stating about.希望我回答了你所说的。

One of the problems is that the Google page omits the android tutorial in languages other than English.问题之一是谷歌页面省略了英语以外语言的android教程。 (it can happen by bug. It happened to me.) Ok ... I'm not very experienced with Crashlytics, and looking to make the migration I came across exactly these links that you showed and I was also confused. (它可能是由错误引起的。它发生在我身上。)好吧......我对 Crashlytics 不是很有经验,并且希望进行迁移我遇到了你展示的这些链接,我也很困惑。 But as I understand it, Fabric Crashlytics was acquired and incorporated into Firebase, so the first tutorial is old, when there was a need for the Fabric library to implement Crashlytics in Firebase.但据我了解,Fabric Crashlytics 被收购并合并到 Firebase 中,所以第一个教程是旧的,当时需要 Fabric 库在 Firebase 中实现 Crashlytics。 The second tutorial does not seem to want to specify which new libraries will be implemented.第二个教程似乎不想指定将实现哪些新库。 The best tutorial I found is this: Oficial: https://firebase.google.cn/docs/crashlytics/upgrade-sdk?platform=android#kotlin+ktx_5 or: https://medium.com/@onkart10/migrating-from-fabric-to-firebase-crashlytics-e8819933c484我找到的最好的教程是:官方: https ://firebase.google.cn/docs/crashlytics/upgrade-sdk ? platform = android#kotlin+ktx_5 或: https ://medium.com/@onkart10/migrating- from-fabric-to-firebase-crashlytics-e8819933c484

I hope it helps others.我希望它可以帮助其他人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM