在集成了统计SDK(友盟统计,百度统计等)之后,有一个非常有利于测试的功能:错误分析
自 定 义 一 个 Application , 比 如 叫 MyApplication 继 承 Application 实 现
UncaughtExceptionHandler。
覆写 UncaughtExceptionHandler 的 onCreate 和 uncaughtException 方法
学习参考博客
https://juejin.im/post/5b231fc451882574866d4519//美团crash治理之路
https://juejin.im/post/5e69a4fd51882549003d2f0e#heading-9
https://juejin.im/post/5e58ed006fb9a07ccc45f141//xcrash
https://juejin.im/entry/57805380c4c9710066cd8779//源码分析android crash处理流程
AssetManager.finalize timeout exception问题解决
https://blog.csdn.net/ZLMrche/article/details/90106632
//assetmanager
https://blog.csdn.net/kc58236582/article/details/53186104一
https://blog.csdn.net/kc58236582/article/details/53187485二
https://blog.csdn.net/kc58236582/article/details/53196071三
Hook toast
腾讯bugly
React-Native Exception Catch
return ReactInstanceManager.builder()
.setNativeModuleCallExceptionHandler(new NativeModuleCallExceptionHandler() {
@Override
public void handleException(Exception e) {
e.printStackTrace();
if (null != rnErrorCallback) {
rnErrorCallback.reportError(e);
}
}
})
.setApplication(context)
.setBundleAssetName("xx.jsbundle")
.setJSMainModulePath("index")
.addPackages(packages)
.setUseDeveloperSupport(debug)
.setInitialLifecycleState(LifecycleState.BEFORE_CREATE)
.build();