phonegap faq

phonegapbuildingfaq

1.xcode-select

fanfq-macbook:hellofanfangqing$cordova-dplatformaddios

cordovalibraryfor"ios"alreadyexists.Noneedtodownload.Continuing.

Checkingifplatform"ios"passesminimumrequirements...

Creatingiosproject...

Runningcommand:/Users/fanfangqing/.cordova/lib/ios/cordova/3.5.0/bin/create--arc--cli/Users/fanfangqing/MyCode/fanfq-html54mobile/phonegap/hello/platforms/ioscom.example.helloHelloWorld

xcode-select:error:tool'xcodebuild'requiresXcode,butactivedeveloperdirectory'/Library/Developer/CommandLineTools'isacommandlinetoolsinstance

CordovacanonlyruninXcodeversion4.6orgreater.

Commandfinishedwitherrorcode2:/Users/fanfangqing/.cordova/lib/ios/cordova/3.5.0/bin/create--arc,--cli,/Users/fanfangqing/MyCode/fanfq-html54mobile/phonegap/hello/platforms/ios,com.example.hello,HelloWorld

Error:/Users/fanfangqing/.cordova/lib/ios/cordova/3.5.0/bin/create:Commandfailedwithexitcode2

atChildProcess.whenDone(/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)

atChildProcess.emit(events.js:98:17)

atmaybeClose(child_process.js:755:16)

atProcess.ChildProcess._handle.onexit(child_process.js:822:5)

fanfq-macbook:hellofanfangqing$cordovaplatformls

*由于最近新出了个swift的东东所以xcode4跟新到了xcode6beta;macos也从Lion直接跟新到Mavericks,跳过了MountainLion由于之前跟新到MountainLion要收费,作为很扣的我当然不愿意支付那笔费用,不过这次跟新到Mavericks是免费的,哈哈,窃喜一小下。

fanfq-macbook:Applicationsfanfangqing$sudoxcode-select--switch/Applications/Xcode6-Beta.app/Contents/Developer

喵哩个咪的问题解决了,在googlegroup中发邮件问题,有专家指出当前phonegap支持xcode最大的版本号是5.1,所以我之前安装的xcode6beta想尝鲜swift所以不得不换成老版本。

///////////////////////////////////////////////////

forandroid

fanfq-macbook:hellofanfangqing$cordovaplatformaddandroid

Creatingandroidproject...

/Users/fanfangqing/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:126

throwe;

^

Error:ERROR:executingcommand'ant',makesureyouhaveantinstalledandaddedtoyourpath.

at/Users/fanfangqing/.cordova/lib/android/cordova/3.5.0/bin/lib/check_reqs.js:47:27

atChildProcess.exithandler(child_process.js:651:7)

atChildProcess.emit(events.js:98:17)

atmaybeClose(child_process.js:755:16)

atSocket.<anonymous>(child_process.js:968:11)

atSocket.emit(events.js:95:17)

atPipe.close(net.js:465:12)

Error:/Users/fanfangqing/.cordova/lib/android/cordova/3.5.0/bin/create:Commandfailedwithexitcode8

atChildProcess.whenDone(/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)

atChildProcess.emit(events.js:98:17)

atmaybeClose(child_process.js:755:16)

atProcess.ChildProcess._handle.onexit(child_process.js:822:5)

fanfq-macbook:hellofanfangqing$

相关推荐