2014-01-29 75 views
0

我想给PhoneGap的一个尝试,所以我下载并安装并启动本指南中的PhoneGap的文档如下:http://docs.phonegap.com/en/3.3.0/guide_cli_index.md.html#The%20Command-Line%20InterfacePhoneGap的 - 无法安装android平台

我创建了一个新的项目和安装iOS平台与命令指南中提到,并试图做同样为Android平台:

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/ophir/.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/ophir/.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:743:16) 
at Socket.<anonymous> (child_process.js:956: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:743:16) 
at Socket.<anonymous> (child_process.js:956:11) 
at Socket.EventEmitter.emit (events.js:95:17) 
at Pipe.close (net.js:466:12) 

I S ee,我有蚂蚁失踪(在重新安装我的mac os之前就有过它)。我怎样才能安装蚂蚁?

感谢

+0

安装[Ant](http://ant.apache.org/manual/install.html) –

回答

0

您的问题蚂蚁没有安装,所以你必须安装蚂蚁第一,然后运行这个命令使确定你的蚂蚁是好的,那么电话差距应该平稳运行:

ant -h