无法在phoneGap中构建android项目

时间:2015-09-06 03:03:45

标签: android cordova

我正在使用Phonegap桌面应用程序来创建phonegap应用程序 当我尝试使用node.js命令提示符构建我的android项目时它给了我 跟随错误

    C:\dbApp>cordova build
Running command: C:\dbApp\platforms\android\cordova\build.bat

C:\dbApp\platforms\android\cordova\node_modules\q\q.js:126
                    throw e;
                          ^
Error: Failed to run "ant -version", make sure you have ant installed and added
to your PATH.
    at C:\dbApp\platforms\android\cordova\lib\check_reqs.js:43:27
    at ChildProcess.exithandler (child_process.js:652:7)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Process.ChildProcess._handle.onexit (child_process.js:823:5)
Error: C:\dbApp\platforms\android\cordova\build.bat: Command failed with exit co
de 8
    at ChildProcess.whenDone (C:\Users\SABA-PC\AppData\Roaming\npm\node_modules\
cordova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Process.ChildProcess._handle.onexit (child_process.js:823:5)

C:\dbApp>

请帮助

1 个答案:

答案 0 :(得分:0)

您好我解决了我的问题。 我必须添加ANT_HOME环境变量