如何使用crashlytics报告第三方NDK崩溃 [英] How to report third party NDK crashes using crashlytics

查看:283
本文介绍了如何使用crashlytics报告第三方NDK崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Google Play控制台获得了以下NDK崩溃报告,但在Crashlytics中却没有.

I am getting the following NDK crash report from Google Play Console, but not in Crashlytics.

#00  pc 0000000000049c44  /system/lib/libc.so (tgkill+12)
#01  pc 00000000000473e3  /system/lib/libc.so (pthread_kill+34)
#02  pc 000000000001d535  /system/lib/libc.so (raise+10)
#03  pc 0000000000019081  /system/lib/libc.so (__libc_android_abort+34)
#04  pc 00000000000170e4  /system/lib/libc.so (abort+4)
#05  pc 000000000000c3a1  /system/lib/libcutils.so (__android_log_assert+112)
#06  pc 000000000002352d  /system/lib/libhwui.so
#07  pc 0000000000024db3  /system/lib/libhwui.so
#08  pc 00000000000281a9  /system/lib/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+80)
#09  pc 000000000000e361  /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+140)
#10  pc 0000000000064d19  /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+80)
#11  pc 0000000000046eb3  /system/lib/libc.so (_ZL15__pthread_startPv+22)
#12  pc 0000000000019acd  /system/lib/libc.so (__start_thread+6)

我想请Crashltytics报告这些崩溃.我们不使用任何NDK库,并且崩溃应来自外部第3方库.我正在阅读 https://docs.fabric.io/android/crashlytics/ndk.html ,但仍不确定该怎么做.

I would like to have Crashltytics to also report these crashes. We don't use any NDK library and the crash should be coming from external 3rd party libraries. I am reading https://docs.fabric.io/android/crashlytics/ndk.html, yet still not sure how to do it.

鉴于我已经在我的Android应用程序中使用了Crashlytics,我必须进行/添加的确切配置更改是什么,以使crashlytics从外部第三方库报告NDK崩溃?

Given that I am already using Crashlytics in my Android app, what is the exact configuration change I have to make/add to have crashlytics report NDK crashes from external 3rd party library?

https://docs.fabric.io/android/crashlytics/ndk中. html ,它提到了Uploading symbols for external dependencies.什么是symbols?我应该在乎吗?

In https://docs.fabric.io/android/crashlytics/ndk.html, it mentioned Uploading symbols for external dependencies. What are symbols? Should I care about it?

谢谢.

推荐答案

您可以将craslytics ndk包含到build.gradle中,并且本机崩溃将在同一仪表板上报告.最近,crashlytics已与Firebase集成.

You can include craslytics ndk to your build.gradle, and the native crashes will be reported in the same dashboard. Recently, crashlytics got integrated with Firebase.

crashlytics {
  enableNdk true
}
implementation 'com.crashlytics.sdk.android:crashlytics:2.8.0'
implementation 'com.crashlytics.sdk.android:crashlytics-ndk:2.0.1'

在Java中,您必须添加NDK:

And in Java you must add NDK:

Fabric.with(this, new Crashlytics(), new CrashlyticsNdk());

nativeInitCrashlytics();

上载符号后,这些报告可能会变得更有意义,但这与您无关,因为您没有第三方本机库的源代码,并且实际上并不能帮助您了解函数的名称.崩溃.

Uploading symbols, these reports may get more meaningful, but this is not relevant for you, because you don't have sources for the third party native libs, and it does not really help to know the name of the function where it crashes.

这是说,请注意,此特定崩溃很可能仍不会出现在Crashlytics仪表板中.堆栈表明某些硬件加速渲染过程失败.可能与您的代码没有直接关系.

This said, please note that it's quite possible that this specific crash will still not appear in Crashlytics dashboard. The stack suggests that some hardware accelerated rendering procedure failed. There may be no direct relation to your code.

这篇关于如何使用crashlytics报告第三方NDK崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆