我已将我的 Cordova 应用程序上传到 PlayStore,并收到以下回复:
During testing we experienced stability issues with your app and were unable to successfully evaluate it for policy compliance. Please make sure your app behaves predictably at runtime and does not crash, hang, or display error messages.
由于我从未遇到过任何稳定性问题,因此我认为我需要记录错误,以便我可以看到出了什么问题。我尝试使用 Sentry for Cordova ,但它不会自动捕获崩溃。我什至打开了an issue关于这一点。但是,如果我使用 Sentry.captureException()
手动记录任何错误,它就会起作用。
所以我想知道是否有一种方法可以记录 Cordova native 异常,以便我手动记录它们?
最佳答案
您可以尝试一下cordova-plugin-native-logs
A Cordova plugin to retrieve native logs directly from your app to let your users easily share them with you for troubleshooting Those logs will be identical to the ones retrieved by the adb logcat command (Android), or displayed in XCode debugger (iOS)
关于cordova - 如何在 Cordova 中捕获 native 异常?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73907064/