我正在尝试在cordova中创建项目我遇到了以下错误
C:\xampp\htdocs\tagcordova\sample>cordova -d platform add android'
Platform "android'" not recognized as a core cordova platform. See "platform lis
t".
C:\xampp\htdocs\tagcordova\sample>cordova -d platform add android
cordova library for "android" already exists. No need to download. Continuing.
Checking if platform "android" passes minimum requirements...
Creating android project...
Running command: cmd args=["/c","C:\\Users\\Bhanuprakash\\.cordova\\lib\\android
\\cordova\\3.4.0\\bin\\create","--cli","C:\\xampp\\htdocs\\tagcordova\\sample\\p
latforms\\android","com.tag.sample","Sample"]
Command finished with error code ENOENT: cmd /c,C:\Users\Bhanuprakash\.cordova\l
ib\android\cordova\3.4.0\bin\create,--cli,C:\xampp\htdocs\tagcordova\sample\plat
forms\android,com.tag.sample,Sample
Error: cmd: Command failed with exit code ENOENT
at ChildProcess.whenDone (C:\Users\Bhanuprakash\AppData\Roaming\npm\node_mod
ules\cordova\src\superspawn.js:112:23)
at ChildProcess.EventEmitter.emit (events.js:95:17)
at Process.ChildProcess._handle.onexit (child_process.js:795:12)
我遵循了文章http://cordova.apache.org/docs/en/3.0.0/guide_cli_index.md.html 请告诉我如何解决问题。
答案 0 :(得分:3)
如果您确定自己的路径,请尝试在cmd中键入android
,如果它显示:'xcopy' was not recognized
。
然后添加到您的路径:
%SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem;
答案 1 :(得分:1)
cordova -d platform add android'
试
cordova -d platform add android
答案 2 :(得分:1)
你好问题是android sdk。
确保您使用的是adt-bundle-windows并设置以下环境路径。
开始 - >控制面板 - >系统和安全 - >系统 - >环境变量 - >系统变量
ANDROID_HOME:C:\ Nithi \ software \ Android_sdk \ adt-bundle-windows-x86_64-20131030 \ adt-bundle-windows-x86_64-20131030 \ sdk \
路径:“现有路径”;%ANDROID_HOME%\ tools;%ANDROID_HOME%\ platform-tools
“现有路径”:系统路径已经存在。
在C:\ Users \ youruser>
关闭命令提示符并打开。
phonegap运行android或cordova平台添加android
希望能够工作!!!!