使用Xcode 6.0-beta添加手机间隙平台时出错

时间:2014-06-09 04:20:16

标签: ios xcode cordova

当我使用命令

cordova platform add ios

我遇到了这个问题

Creating ios project...
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Cordova can only run in Xcode version 4.6 or greater.
Error: /Users/ykorshev/.cordova/lib/ios/cordova/3.5.0/bin/create: Command failed with exit code 2
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:753:16)
    at Process.ChildProcess._handle.onexit (child_process.js:820:5)

安装了Xcode beta 6和Xcode命令行开发人员工具。我使用的是Mac OS X v10.9.3

1 个答案:

答案 0 :(得分:16)

使用它:

sudo xcode-select -s /Applications/Xcode6-Beta.app/

这对我来说很好