2014-01-14 89 views
0

嗨即時嘗試啓動一個項目與phonegap 3.3。我遇到的問題是試圖讓節點啓動項目。我設置了環境變量,並且在設置中包含了ant。
這是我的錯誤(如果有更多的信息需要,我會提供它)Phonegap 3.3通過節點創建項目

[phonegap] adding the Android platform... 
    [error] An error occured during creation of android sub-project. 

C:\Users\denis\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:126 
        throw e; 
         ^
Error: An error occurred while listing Android targets 
    at C:\Users\denis\.cordova\lib\android\cordova\3.3.0\bin\lib\check_reqs.js:8 
7:29 
    at _rejected (C:\Users\denis\.cordova\lib\android\cordova\3.3.0\bin\node_mod 
ules\q\q.js:808:24) 
    at C:\Users\denis\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js 
:834:30 
    at Promise.when (C:\Users\denis\.cordova\lib\android\cordova\3.3.0\bin\node_ 
modules\q\q.js:1079:31) 
    at Promise.promise.promiseDispatch (C:\Users\denis\.cordova\lib\android\cord 
ova\3.3.0\bin\node_modules\q\q.js:752:41) 
    at C:\Users\denis\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js 
:574:44 
    at flush (C:\Users\denis\.cordova\lib\android\cordova\3.3.0\bin\node_modules 
\q\q.js:108:17) 
    at process._tickCallback (node.js:415:13) 
+0

您是否在啓動add platform命令之前執行cd到您的應用程序文件夾? – QuickFix

回答

2

問題是環境變量路徑:按照此。

設置環境變量:

Path: 
Start -> Control Panel -> System and Security -> System -> Environment variables 

Or 

Mycomputer -> Right Click -> properties -> Advance System settings -> Environment variables 

1. Java JDK 
2. Android SDK 
3. ANT 

用戶變量USER1: 路徑:%SYSTEMROOT%\ SYSTEM32;的%SystemRoot%;%SYSTEMROOT%\ SYSTEM32 \ WBEM;%SYSTEMROOT%\ SYSTEM32 \ WindowsPowerShell \ V1 0.0 \; C:\用戶\ USER1 \應用程序數據\漫遊\ NPM \

溫度: %USERPROFILE%\應用程序數據\本地\溫度

系統變量:

ANDROID_HOME:C:\ Nithi \ SOFTWARE \ Android_sdk \ ADT-束 - 窗口x86_64-20131030 \ ADT-束 - 窗口x86_64-20131030 \ SDK \ 路徑:

ANT_HOME:C:\螞蟻

JAVA_HOME:C:\ Program Files文件\的Java \ jdk1.7.0_45 \

JAVA_PATH:C:\ Program Files文件(x86)的\的Java \ jre7 \ BIN

路徑:C:\ Program Files文件(86 )\ Intel \ iCLS Client \; c:\ Program Files \ Intel \ iCLS Client \;%SystemRoot%\ system32;%SystemRoot%;%SystemRoot%\ System32 \ Wbem;%SYSTEMROOT%\ System32 \ WindowsPowerShell \ v1.0 \ ; C:\ Program Files \ Inte英特爾(R)管理引擎組件\ DAL; C:\ Program Files \ Intel \ Intel(R)管理引擎組件\ IPT; C:\ Program Files(x86)\ Intel \ Intel(R)Management Engine Components \ DAL ; C:\ Program Files(x86)\ Intel \ Intel(R)Management Engine Components \ IPT; C:\ Program Files(x86)\ Windows Live \ Shared; C:\ Program Files \ nodejs \;%ANT_HOME%\ bin ;%JAVA_HOME%\ bin;%ANDROID_HOME%\ tools;%ANDROID_HOME%\ platform-tools