简体   繁体   中英

phonegap, cordova can't add platform android

I installed both phonegap and cordova .

I created my project set my paths to tools. Now I enter my project through ' cmd ' I type:

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

This will fix your issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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