"Error: Your android platform does not have Api.js" when trying to build android version 5.x.x

7.8k views Asked by At

cordova version is 7.0.1

node version is v8.0.0

when running cordova platform add android@5 everything works fine. (except for cordova-plugin-media requiring android version >=6.1.0 but thats another story)

When running cordova platform add android@4 (similar for cordova platform add android@3) I get

Using cordova-fetch for cordova-android@4
Adding android project...
Error: Your android platform does not have Api.js

despite cordova officially still supporting those android versions. What am I missing here?

The only other post remotely containing this particular error I found is here, but it was not helpful.

1

There are 1 answers

4
Oleg S. On

I solved this problem trying 6.0.0 version

npm install -g [email protected]

then there was error with bplist-parser in npm

npm install -g bplist-parser

All works fine!