Gabriele
Gabriele

Reputation: 11

CordovaError: Failed to fetch platform cordova-android // Error: cmd: Command failed with exit code ENOENT

I installed cordova and create a new project.

But when I use this command to add android platform, this error appears.

Error

Can someone help me with this? I've no idea of where to start, I've tried to use all the android APIs but nothing solves this, besides there's a ENOENT error code.

Upvotes: 1

Views: 296

Answers (1)

andreszs
andreszs

Reputation: 2956

I don't think there's a cordova platform android "6.0", as the Cordova versions usually have 3 digits. Try either of these:

cordova platform add android /* get latest version */
cordova platform add [email protected] /* get 6.3.0 */

Also, version 6.0(.0) is too old, cordova-android is now in version 7.1.0 or 8.0.0 if I remember correctly. If you use obsolete cordova or cordova-android versions, some plugins could fail to install/work properly.

Upvotes: 1

Related Questions