Cordova-android vs android build question


#1

I want to understand what is cordova-android.

When I add a platform to ionic/cordova using:
ionic cordova platform add android

which version of the platform is added?

Als, which version of cordova-android corresponds to which version of android API?

How can I change the version of cordova-android and the android API version in my build?

And Do the versions need to match for a successful build?


#2

The one that is pinned in your Cordova CLI version.

See documentation: https://cordova.apache.org/docs/en/7.x/guide/platforms/android/index.html#requirements-and-support

Define which version to install with ionic cordova platform add android@6.2.3 (example 6.2.3).

Your build environment has to match the cordova-android version - you can check with ionic cordova requirements.