Cordova 3系でのエラー
Cordova 3.3.1にて。
$ cordova platform add android Creating android project... /usr/local/lib/node_modules/cordova/node_modules/q/q.js:126 throw e; ^ Error: An error occured during creation of android sub-project. /Users/[username]/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:126 throw e; ^ Error: ERROR : executing command 'ant', make sure you have ant installed and added to your path. at /Users/[username]/.cordova/lib/android/cordova/3.3.0/bin/lib/check_reqs.js:47:27 at ChildProcess.exithandler (child_process.js:641:7) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:735:16) at Socket.<anonymous> (child_process.js:948:11) at Socket.EventEmitter.emit (events.js:95:17) at Pipe.close (net.js:466:12) at /usr/local/lib/node_modules/cordova/src/platform.js:244:30 at ChildProcess.exithandler (child_process.js:641:7) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:735:16) at Socket.<anonymous> (child_process.js:948:11) at Socket.EventEmitter.emit (events.js:95:17) at Pipe.close (net.js:466:12)
エラーの通りantがなかっただけ。
$ brew install ant
他にもAndroid SDKへのパスが通ってなかったり、最新じゃなくても似た感じのエラーがでるっぽい(未確認)。
3系でフォルダ構成が変わって既存のバージョン管理の移動させ方に悩み中。