xCrash is a crash reporting library for Android APPs. It support catching native crash and Java exception.
xCrash can generate a tombstone file (similar format as Android system's tombstone file) in the directory you specified when the APP process crashes. And, no root permission or any system permissions are required.
xCrash is used in a variety of Android APPs (including iQIYI Video) from iQIYI for many years.
dependencies {
implementation 'com.iqiyi.xcrash:xcrash-android-lib:2.0.5'
}
android {
defaultConfig {
ndk {
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
}
-keep class xcrash.NativeCrashHandler {
native <methods>;
void callback(...);
}
Application#attachBaseContext()
.public class MyCustomApplication extends Application {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
xcrash.XCrash.init(this);
}
}
Tombstone files will be written to Context#getFilesDir() + "/tombstones"
directory by default. (usually in: /data/data/<APP_PACKAGE_NAME>/files/tombstones
)
There is a more practical and complex sample APP in the src/java/xcrash/xcrash_sample folder.
cd ./src/native/
./build.sh
./install.sh
cd ./src/java/xcrash/
./gradlew :xcrash_lib:build
See xCrash Contributing Guide.
xCrash is MIT licensed, as found in the LICENSE file.
xCrash documentation is Creative Commons licensed, as found in the LICENSE-docs file.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。