[英]Viewing console logs on react-native Android release build
I'm currently facing an issue which only exists in production/release build for Android. Is it possible to run debugger or view logs for production/release builds?我目前面临的问题仅存在于 Android 的生产/发布版本中。是否可以运行调试器或查看生产/发布版本的日志?
Use console.log
, console.warn
, etc.使用
console.log
、 console.warn
等。
You can try simply run the following to see logs in the console:您可以尝试简单地运行以下命令以在控制台中查看日志:
react-native log-ios
react-native log-android
Reference: https://stackoverflow.com/a/38056698/9877424参考: https://stackoverflow.com/a/38056698/9877424
Try the following:尝试以下操作:
Run the logger for android using the following:使用以下命令运行 android 的记录器:
npx react-native log-android
Then run your app in release mode:然后以发布模式运行您的应用程序:
npx react-native run-android --variant=release
All of your console.log() and console.warn() should be displayed.您的所有 console.log() 和 console.warn() 都应该显示出来。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.