android - Android进程崩溃时如何创建崩溃日志

标签 android logging crash acra

我的 Java 代码将调用 native 代码。当 native 代码崩溃时,我想将崩溃日志写入自己的文件。我怎样才能做到这一点?我使用过 ACRA,但它不适用于 native 代码。
非常感谢。

最佳答案

来自 ACRA 开发人员的评论发现 here

Comment by project member kevin.gaudin, Dec 16, 2010

Ok, I don't think we can do anything to catch native crashes if they don't result in a Java Exception.

In a future release, I'm planning to add an option to (optionaly) upload a short logcat extract + DropBoxManager? system items. This should allow to get some of these traces, but only if an exception triggers the report... or if you detect an unexpected state and trigger a report yourself.



但是,您也许可以使用 this solution

关于android - Android进程崩溃时如何创建崩溃日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4954527/

相关文章:

android - 使用zlib列出android中apk文件的目录结构

android - 如何在 Android 中设计任何屏幕尺寸和密度(Android 中的手机多屏)

Android SurfaceView 滚动

linux - logrotate 在 postrotate 脚本之后压缩文件

Android LicenseChecker 因空指针异常而崩溃

javascript - 尝试编辑 "React Native init"文件结构

python - 如何在不注释掉 Python 日志调用的情况下剥离它们?

iphone - 在 iPhone 上崩溃,但在模拟器上没有崩溃

ios - 应用程序在启动屏幕上崩溃(在 iPad 10.2 上)

language-agnostic - 日志库有什么用?