android - 强制崩溃反应本机应用程序以进行错误测试
问题描述
有什么办法可以强制崩溃反应原生生产 apk 吗?
我知道在 fabric 中有一个选项,Crashlytics.crash();
但我不想使用 Crashlytics,因为我已经在使用 bugsnag。
解决方案
查看 Bugsnag React Native 示例应用程序,了解如何触发测试崩溃的一些示例: https ://github.com/bugsnag/bugsnag-react-native/tree/master/examples/plain
例如触发原生崩溃:
它使用:
https://github.com/bugsnag/bugsnag-react-native/blob/master/examples/plain/app/lib/native_crash.js
如果您需要进一步的帮助,请联系 Bugsnag 支持。