React native 无法运行项目

React native 无法运行项目,react-native,react-redux,react-native-ios,React Native,React Redux,React Native Ios,我也选择了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 t

我也选择了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> 

xcrun:错误:无法确定“/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk”的realpath(errno=无此类文件或目录)
xcrun:错误:找不到实用工具“instruments”,不是开发人员工具或路径中的工具
命令失败:xcrun instruments-s
xcrun:错误:无法确定“/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk”的realpath(errno=无此类文件或目录)
xcrun:错误:找不到实用工具“instruments”,不是开发人员工具或路径中的工具
错误:命令失败:xcrun instruments-s
xcrun:错误:无法确定“/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk”的realpath(errno=无此类文件或目录)
xcrun:错误:找不到实用工具“instruments”,不是开发人员工具或路径中的工具
在checkExecSyncError(child_process.js:601:13)
在Object.execFileSync(child_process.js:621:13)
在Object.runIOS[as func](/Users/ranjith/Documents/Project/Login\u React/node\u modules/React native/local cli/runIOS/runIOS.js:76:17)
在Promise.resolve.then(/Users/ranjith/Documents/Project/Login\u React/node\u modules/React native/local cli/cliEntry.js:117:22)
在

您是否安装了XCode和命令行工具

检查Xcode命令行工具是否正确配置,请按照以下路径操作

打开Xcode>首选项>位置

然后设置命令行工具


在我的例子中,Xcode更新导致iPhoneOS-12.2.sdk不再可用;相反,路径包含iPhoneOS-12.4.sdk。但是
react native run ios
抱怨无法找到
12.2


重新启动计算机解决了此问题。

您是否尝试查看该路径?看起来你可能需要安装一个特定的iPhone模拟器:iOS 11.4谢谢,是的,它就在那里,我纠正了它现在可以工作了,我使用了npm add@babel/runtime,npm install--save react-native@0.57.1然后回应:谢谢:)我已经这么做了,但没有问题,我纠正了现在它工作了,我使用了npm add@babel/runtime,npm install--save react-native@0.57.1然后做出反应,这仍然是2019年的解决方案。