Cordova add android platform gives an error: there is no Api.js on your Android platform

I updated the cordova to 7.0.1 in windows 8.1. After creating the project, when I add the platform using this command

cordova platform add android

This gives me the following error

 Using this version of Cordova with older version of cordova-android is deprecated. Upgrade to cordova-android@5.0.0 or newer.
 Error: Your android platform does not have Api.js

I tried to find it on the forums, but did not understand.

+4
source share
3 answers

I think you have a cordova-android version older than 5 years old. Try to force update the cord:

npm install -g cordova@7.0.0

then try reading android cordova :

cordova platform rm android
cordova platform add android
+5
source

run

$ sudo npm uninstall cordova -g

and

$ sudo npm install -g cordova@6.0.0

I have not received another solution

+2
source

Run it on your terminal

ionic cordova platform rm .idea
+1
source

Source: https://habr.com/ru/post/1677200/


All Articles