有什么办法可以强制崩溃 react 原生生产 apk 吗?
我知道 Crashlytics.crash();
有一个选项在织物中,但我不想使用 Crashlytics,因为我已经在使用 bugsnag。
最佳答案
查看 Bugsnag React Native 示例应用程序,了解如何触发崩溃以进行测试的一些示例:
https://github.com/bugsnag/bugsnag-react-native/tree/master/examples/plain
例如。触发 native 崩溃:
https://github.com/bugsnag/bugsnag-react-native/blob/84f9cd639c2e38231616d15a85eba153da14a70e/examples/plain/app/index.js#L16
它使用:
https://github.com/bugsnag/bugsnag-react-native/blob/master/examples/plain/app/lib/native_crash.js
如果您需要进一步的帮助,请联系 Bugsnag 支持。
关于android - 强制崩溃 react native 应用程序以进行错误测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56185900/