简体   繁体   English

phonegap,cordova无法添加平台android

[英]phonegap, cordova can't add platform android

I installed both phonegap and cordova . 我同时安装了phonegapcordova

I created my project set my paths to tools. 我创建了项目,设置了我的工具路径。 Now I enter my project through ' cmd ' I type: 现在,我通过输入“ cmd ”输入项目:

cordova platform add android

Imagining that it will work but I get the below error: 想象它会工作,但出现以下错误:

Creating android project...
    Error: cmd: Command failed with exit code ENOENT
    at ChildProcess.whenDone <C:\Users\-\AppData\Roaming\npm\node_modules\cordova\src\superspawn.js:112:23
    at ChildProcess.EventEmitter.emit <events.js:95:17>
    at Process.ChildProcess._handle.onexit <child_process.js:795:12>

what could be the reason for this? 这可能是什么原因? what am I doing wrong? 我究竟做错了什么? My thanks in advance. 提前谢谢

my PATH 我自己的路

D:\Development\Android\android-sdk\platform-tools;
D:\Development\Android\android-sdk\tools;
D:\Development\eclipse\plugins\org.apache.ant_1.8.4.v201303080030\bin;
C:\Program Files\Java\jdk1.7.0_51\bin;C:\Program Files\Java;
C:\Program Files\nodejs\;C:\Users\-\AppData\Roaming\npm

Ensure to create a project name without space and root folder, sub folder should not have space. 确保创建一个没有空格和根文件夹的项目名称,子文件夹不应有空间。

c:users\\youruser>cordova create testapp com.test.testapp tesapp c:users \\ youruser> cordova创建testapp com.test.testapp tesapp

This will fix your issue. 这样可以解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM