cordova - Error: Failed to fetch platform android cordova - Error: Failed to fetch platform android android android

cordova - Error: Failed to fetch platform android


I had the same problem with the android@5.1.1 version. I solved this issue, checking what version of android is provided by cordova. You can check it in C:/Users/%USER%/.cordova/lib/npm-cache/cordova-android

Then, you install the android platform version provided. For me it was @5.1.0 which was in my cordova-android folder. So I used the cmd line following:

cordova platform add android@5.1.0 which should be a differnet version for you.

Kind regards !


Had the same issue after using nvm to switch node version. Just removing android platform and reinstalling it works for me:

cordova platform rm android && cordova platform add android


you can check the android version provided by cordova by typing cordova platform ls inside projectname/cordova folder. I refered from below url https://cordova.apache.org/docs/en/latest/guide/platforms/android/.
(For me .cordova/lib folder was empty).

Then add that platform from inside project's cordova folder by executing cordova platform add android@5.1.1 (in my case, solved the issue).