首页 > 解决方案 > 无法运行项目

问题描述

我也在 Xcode 首选项中选择了位置,但得到了同样的错误:

在此处输入图像描述

xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk' (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH

Command failed: xcrun instruments -s
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk' (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH

Error: Command failed: xcrun instruments -s
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk' (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH

at checkExecSyncError (child_process.js:601:13)
at Object.execFileSync (child_process.js:621:13)
at Object.runIOS [as func] (/Users/ranjith/Documents/Project/Login_React/node_modules/react-native/local-cli/runIOS/runIOS.js:76:17)
at Promise.resolve.then (/Users/ranjith/Documents/Project/Login_React/node_modules/react-native/local-cli/cliEntry.js:117:22)
at <anonymous> 

在此处输入图像描述

标签: react-nativereact-reduxreact-native-ios

解决方案


Xcode 首选项

检查 Xcode 命令行工具是否配置正确,请遵循以下路径

打开 Xcode > 首选项 > 位置

然后设置命令行工具


推荐阅读