【问题标题】:Not able to run project无法运行项目
【发布时间】:2018-10-05 10:54:29
【问题描述】:

我在 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> 

【问题讨论】:

  • 您是否尝试过查看该路径?看来您可能必须安装特定的 iPhone 模拟器:iOS 11.4

标签: react-native react-redux react-native-ios


【解决方案1】:

检查 Xcode 命令行工具是否配置正确进入以下路径

打开 Xcode > 首选项 > 位置

然后设置命令行工具

【讨论】:

  • 谢谢 :) 我已经这样做了,但没有问题,我纠正了现在它正在工作我使用 npm add @babel/runtime , npm install --save react-native@0.57.1​​ 和然后 react-native run-ios
【解决方案2】:

就我而言,Xcode 更新导致 iPhoneOS-12.2.sdk 不再可用;相反,该路径包含 iPhoneOS-12.4.sdk。但是react-native run-ios 抱怨找不到12.2

重启电脑解决了这个问题。

【讨论】:

  • 令人惊讶的是,这仍然是 2019 年的解决方案。
【解决方案3】:

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

【讨论】:

  • 谢谢,是的,它就在那里,我纠正了现在它正在工作我使用 npm add @babel/runtime , npm install --save react-native@0.57.1​​ 然后 react-native run-ios
猜你喜欢
  • 2018-04-05
  • 2015-01-12
  • 1970-01-01
  • 1970-01-01
  • 2023-04-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多