运行phonegap run android命令时出错

时间:2014-04-26 13:21:15

标签: cordova

我收到以下错误:

C:\my-app>phonegap build android
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] adding the Android platform...

C:\Users\amans_000\.cordova\lib\android\cordova\3.4.0\bin\node_modules\q\q.js:12
6
                    throw e;
                          ^
Error: ERROR : executing command 'ant', make sure you have ant installed and add
ed to your path.
    at C:\Users\amans_000\.cordova\lib\android\cordova\3.4.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:465:12)
{ [Error: cmd: Command failed with exit code 8] code: 8 }
   [error] cmd: Command failed with exit code 8

是否缺少某些东西。我已按照http://docs.phonegap.com/en/edge/guide_cli_index.md.html#The%20Command-Line%20Interface

上的说明进行操作

1 个答案:

答案 0 :(得分:0)

请安装&#34; ant&#34;这里的工具,http://ant.apache.org/bindownload.cgi

并确保它在您的路径上(必要时设置PATH变量)