Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova Platform add android gives Error: Your android platform does not have Api.js

I have updated cordova to 7.0.1 in windows 8.1 After creating project when i add platform using this command

cordova platform add android

It gives me following error

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

I tried to search it on forums but didn't get it resolved.

like image 681
Divyesh Savaliya Avatar asked May 15 '17 19:05

Divyesh Savaliya


People also ask

Does Cordova support Android 12?

We have integrated the Android 12 SplashScreen API including the compatibility library into the core of the Cordova-Android platform to provide support for Android API 22+.


3 Answers

I think you have cordova-android version older than 5. Try to force cordova update:

npm install -g [email protected]

then try to readd cordova-android:

cordova platform rm android
cordova platform add android
like image 52
Frix33 Avatar answered Oct 13 '22 21:10

Frix33


run

$ sudo npm uninstall cordova -g

and

$ sudo npm install -g [email protected]

I did not get another solution

like image 42
Matias Solis de la Torre Avatar answered Oct 13 '22 21:10

Matias Solis de la Torre


Run this at your terminal

ionic cordova platform rm .idea
like image 28
vofili Avatar answered Oct 13 '22 20:10

vofili