尝试启动iOS模拟器时,我收到以下消息:
peters-mbp-2:hello pz$ cordova emulate ios
Running command: /Users/pz/ss/hello/platforms/ios/cordova/run --emulator
simctl was not found.
Check that you have Xcode 6.x installed:
xcodebuild --versionCheck that you have Xcode 6.x selected:
xcode-select --print-path
Error: /Users/pz/ss/hello/platforms/ios/cordova/run: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:817:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
我的Xcode版本很好,版本6.2如下所示:
peters-mbp-2:hello pz$ xcodebuild -version
Xcode 6.2
Build version 6C131e
我相信我的路径没有设置,但是我不确定要将它设置为什么,当前路径是:
peters-mbp-2:hello pz$ xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
同样,我相信我只需要运行以下命令就可以了,有人知道我应该设置路径吗?
peters-mbp-2:hello pz$ xcode-select -s <some path>
答案 0 :(得分:6)
从Mavericks更新到El Capitan然后Xcode 6更新为Xcode 7后出现同样的问题。
只需打开Xcode就可以完成&#34;安装组件&#34;。
答案 1 :(得分:2)
卸载Xcode并重新安装,然后在安装后启动Xcode修复了我的问题 - 我没有必须明确设置路径。