简体   繁体   English

通过 Crashlytics 报告 Android 库中的崩溃

[英]Reporting Crashes in Android Library via Crashlytics

I am building an android library that I plan to integrate into many 3rd party apps(which do not belong to me).我正在构建一个 android 库,我计划将其集成到许多 3rd 方应用程序(不属于我)中。

So, I am trying to figure out a way to find out if any of those 3rd party apps crashes due to the code in my library.所以,我试图找出一种方法来找出是否有任何 3rd 方应用程序由于我的库中的代码而崩溃。 Is there any way to find that out?有什么办法可以找出来吗?

I was looking at Crashlytics to achieve the same.我正在寻找 Crashlytics 来实现相同的目标。 But, as I understand, Crashlytics will be able to give the Crash analytics to only the app owner, right?但是,据我所知,Crashlytics 只能将崩溃分析提供给应用程序所有者,对吗? Is there any way to collect the crash info without the intervention of the 3rd party app?有没有办法在没有第三方应用程序干预的情况下收集崩溃信息?

Thanks.谢谢。

EDIT: This isn't a duplicate of Integrating Crashlytics to library project because I want Crashlytics to be part of an android library which will sit on multiple android apps, but I want to be notified separately - not from the app which is installing my android library.编辑:这不是将 Crashlytics 集成到库项目的副本,因为我希望 Crashlytics 成为一个 android 库的一部分,该库将位于多个 android 应用程序上,但我想单独收到通知 - 而不是来自正在安装我的 android 的应用程序图书馆。

Mike from Fabric here.来自 Fabric 的 Mike。 Adding Fabric or Crashlytics into a library that will be used by external developers is not supported and should not be done.不支持且不应将 Fabric 或 Crashlytics 添加到将由外部开发人员使用的库中。

No, you cannot, at least without some hacking.不,你不能,至少没有一些黑客攻击。 Crashlytics should only be user in applications or library subproject ( https://docs.fabric.io/android/crashlytics/build-tools.html#set-up-a-library-subproject ). Crashlytics 只能是应用程序或库子项目 ( https://docs.fabric.io/android/crashlytics/build-tools.html#set-up-a-library-subproject ) 中的用户。 And you shouldn't, crashlytics group all the crashes by package name.而且您不应该,crashlytics 按包名称对所有崩溃进行分组。 Even if you with some hacking were able to include the crashlytics in your library you will probably receive also crashes from the application (not related with your library), and you will need to include and expose your API keys in your library... So you should not include crashlytics in a library.即使您通过一些黑客技术能够将 crashlytics 包含在您的库中,您也可能会收到来自应用程序的崩溃(与您的库无关),并且您需要在您的库中包含和公开您的 API 密钥......所以您不应在库中包含 crashlytics。

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

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