React Native:Xcode 中没有日志显示并且 react-native 运行-ios 抛出奇怪的错误
React Native: No logs showing up in Xcode and react-native run-ios throws weird error
虽然 运行 真实 iOS 设备上的 React Native 应用程序,Xcode 在 window 它应该打印所有这些。它只是空的。
此外,react-native-run-ios
不会启动,而是抛出此错误:
error Cannot read property 'udid' of null.
- 该应用构建良好并在设备上运行。通过摇一摇菜单重新加载应用程序没有帮助。
- React Native 版本为
0.59.9
断开并重新连接设备的电缆到计算机并再次构建使日志出现。
react-native run-ios
现在抛出预期的错误:
error Could not find iPhone X simulator.
(或您的默认模拟器)。
我最初启动 XCode 时 phone 已经连接。因此,最好在 XCode 已打开时将 phone 连接到计算机。
虽然 运行 真实 iOS 设备上的 React Native 应用程序,Xcode 在 window 它应该打印所有这些。它只是空的。
此外,react-native-run-ios
不会启动,而是抛出此错误:
error Cannot read property 'udid' of null.
- 该应用构建良好并在设备上运行。通过摇一摇菜单重新加载应用程序没有帮助。
- React Native 版本为
0.59.9
断开并重新连接设备的电缆到计算机并再次构建使日志出现。
react-native run-ios
现在抛出预期的错误:
error Could not find iPhone X simulator.
(或您的默认模拟器)。
我最初启动 XCode 时 phone 已经连接。因此,最好在 XCode 已打开时将 phone 连接到计算机。