React Native 或 Xcode:无法找到实用程序“工具”,而不是开发人员工具或在 PATH 中

Nic*_*k H 6 xcode command-line react-native

xcrun: error: sh -c '/Applications/Xcode-beta.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find instruments 2> /dev/null' failed with exit code 17664: (null) (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
Run Code Online (Sandbox Code Playgroud)

发布此内容是因为在 Monterrey Beta 的我的 M1 上,我花了一些时间将头撞到墙上......不过我找到了解决办法

Nic*_*k H 10

sudo xcode-select -r
Run Code Online (Sandbox Code Playgroud)

我必须运行重置命令行工具命令,这是一个简单的解决方案,可以解决我搞砸的事情。