简体   繁体   中英

Cordova cannot build Android project using NPM CLI. failed with exit code ENOENT

Cordova cannot add Android project using NPM CLI. failed with exit code ENOENT. I have installed ANT, ANDROID_HOME and java variables. Please see the screenshot

Error: http://s7.postimg.org/531wg4n6z/Untitled.png

Environment Variables: http://s16.postimg.org/6jgpp3bxh/Untitled.png

I had same kind of an error but i'm not sure is that the same. because you didn't give much details about your error. but for me, i reinstall cordova then update it.after that its worked as a charm. try the following steps


1.run the command: npm uninstall cordova -g

2.delete the folder: C:\\Users\\your-name.cordova

3.reinstall the cordova: npm install -g cordova

4.now go to the project folder and try again: cordova platform add android

5.npm update -g cordova.


try this and let us know. thank you.

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