2015-09-06 62 views
1
構建Android項目

我使用PhoneGap的桌面應用程序創建的PhoneGap應用 當我嘗試使用Node.js的打造我的Android項目的命令提示符它給了我 以下錯誤無法在PhoneGap的

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> 

請幫助

回答

0

你好,我解決了我的問題。我必須添加ANT_HOME環境變量