首页 > 解决方案 > React-Native xcrun:错误:无法在 Xcode 13 中找到“仪器”

问题描述

instrumentsXcode 13 中删除了命令行工具,Apple 要求xctrace改用。但我不确定如何在终端上运行 React-Native 项目时修复它。

npx react-native run-ios --device "iPhone"

实际上,我看到以下错误。

xcrun: error: Failed to locate 'instruments'.
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
error Command failed: xcrun instruments -s

有没有人有办法解决吗?

标签: iosxcodereact-nativexcode13

解决方案


由于它已在 xcode 13 中删除,因此您有两个选择。您可以将您的 RN 版本升级到0.65.x已修复此问题的版本或降级到 xcode 12。


推荐阅读