在我的颤振应用程序的代码库中有一个异常抛出。
然而,这是控制台输出的内容:
[VERBOSE-2:dart_error.cc(16)] Unhandled exception:
// (nothing, should be printing stack-trace or error message here)

如果没有堆栈跟踪,就很难找到这个bug的来源。
有人知道堆栈跟踪或错误消息不打印是否正常吗?
是否存在运行flutter run以查看有关抛出错误的更多信息的模式?
设置:
flutter: 0.2.8
running on an iphone device发布于 2018-07-10 20:54:00
阻止ios物理设备/颤振错误的一个见解是检查物理设备控制台和设备日志。在我的例子中,我正在使用iPhone6S试图在相机应用程序上工作。
日志可以通过Xcode ->窗口->设备和模拟器获得->选择设备,然后选择“查看设备日志”或“打开控制台”按钮。选择用于“错误和错误”的按钮,以使这更容易一些。
在我的例子中,我发现了相机权限中的一个错误,在我的开发环境中根本看不见。应用程序刚刚崩溃,我不知道为什么.然后我在日志里找到了这个。
error 21:51:03.438135 -0700 tccd Refusing TCCAccessRequest for service kTCCServiceCamera and client /var/containers/Bundle/Application/A817FC3E-F55D-46F5-9EF2-372E4FC90B1B/Runner.app[319] without NSCameraUsageDescription key
error 21:51:03.476854 -0700 Runner This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.在iPhone上,我的相机进退两难的解决方法如下:
<key>NSCameraUsageDescription</key>
<string>Camera used to take photos in support of the app.</string>都修好了!
https://stackoverflow.com/questions/49959278
复制相似问题