问题描述
D:\Shabbir\AndroidTest>cordova platform add android
Creating android project...
C:\Documents and Settings\avaya11\Application Data\npm\node_modules\cordova\node
_modules\q\q.js:126
throw e;
^
Error: An error occured during creation of android sub-project.
C:\Documents and Settings\avaya11\.cordova\lib\android\cordova\3.3.0\bin\node_mo
dules\q\q.js:126
throw e;
^
Error: An error occurred while listing Android targets
at C:\Documents and Settings\avaya11\.cordova\lib\android\cordova\3.3.0\bin\
lib\check_reqs.js:87:29
at _rejected (C:\Documents and Settings\avaya11\.cordova\lib\android\cordova
\3.3.0\bin\node_modules\q\q.js:808:24)
at C:\Documents and Settings\avaya11\.cordova\lib\android\cordova\3.3.0\bin\
node_modules\q\q.js:834:30
at Promise.when (C:\Documents and Settings\avaya11\.cordova\lib\android\cord
ova\3.3.0\bin\node_modules\q\q.js:1079:31)
at Promise.promise.promiseDispatch (C:\Documents and Settings\avaya11\.cordo
va\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:752:41)
at C:\Documents and Settings\avaya11\.cordova\lib\android\cordova\3.3.0\bin\
node_modules\q\q.js:574:44
at flush (C:\Documents and Settings\avaya11\.cordova\lib\android\cordova\3.3
.0\bin\node_modules\q\q.js:108:17)
at process._tickCallback (node.js:415:13)
at C:\Documents and Settings\avaya11\Application Data\npm\node_modules\cordo
va\src\platform.js:244:30
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
D:\Shabbir\AndroidTest>
这个错误我得到了
我下载和的NodeJS安装继
I downloaded NodeJS and install Following
npm -g install phonegap
npm -g install cordova
npm -g install plugman
npm -g install ant
我设置一些路径
PATH
C:\Documents and Settings\avaya11\Application Data\npm;C:\Documents and Settings\avaya11\Application Data\npm\node_modules\ant;C:\NEW ANDROID\sdk\platforms;C:\NEW ANDROID\sdk\platform-tools;C:\Documents and Settings\avaya11\Application Data\npm\node_modules\ant\bin;C:\Program Files\Java\jdk1.6.0_45\bin
这是我从
ANT_HOME
C:\Program Files\Java\apache-ant-1.9.3
还增加了JAVA_HOME,ANDROID_HOME
also added JAVA_HOME , ANDROID_HOME
我做了所有可能的方法,但仍然发现错误PLZ帮我找到解决办法
我想我困惑设置的路径。
I did all possible ways but still found error PLZ help me to find solutionI think I confused to set a path.
推荐答案
在这么多的研究工作我找到了答案。
After so much research work I found the answer.
我没有设置XCOPY的路径。
I have not set path of the xcopy.
XCOPY.EXE - 此文件包含SDK平台的信息
所以我添加的这条道路。 XCOPY.EXE位于System32文件夹中。
xcopy.exe - this file contains sdk platform information.
So I added path of this. xcopy.exe is located in system32 folder.
所以我添加的路径是这样,我可以添加Android平台。
So I added path like this and I able to add android platform.
的%SystemRoot%\\ SYSTEM32;
%SystemRoot%\System32;
这篇关于同时增加对科尔多瓦Android平台的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!