Phonegap 3.3通过节点创建项目

时间:2014-01-14 16:57:22

标签: node.js cordova startup phonegap-build

您好我试图用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)

1 个答案:

答案 0 :(得分: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 \; C:\ Users \ user1 \ AppData \ Roaming \ npm \

温度:    %USERPROFILE%\应用程序数据\本地\温度

系统变量:

ANDROID_HOME:C:\ Nithi \ software \ Android_sdk \ adt-bundle-windows-x86_64-20131030 \ adt-bundle-windows-x86_64-20131030 \ sdk \    路径:

ANT_HOME:C:\ ant

JAVA_HOME:C:\ Program Files \ Java \ jdk1.7.0_45 \

JAVA_PATH:C:\ Program Files(x86)\ Java \ jre7 \ bin

路径:c:\ Program Files(x86)\ Intel \ iCLS Client \; c:\ Program Files \ Intel \ iCLS Client \;%SystemRoot%\ system32;%SystemRoot%;%SystemRoot%\ System32 \ Wbem; %SYSTEMROOT%\ System32 \ WindowsPowerShell \ v1.0 \; C:\ Program Files \ Intel \ Intel(R)Management Engine Components \ DAL; C:\ Program Files \ Intel \ Intel(R)Management Engine Components \ 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