Could we please have an updated list of recommended android versions based on the ionic release?
angular-ionic 3.9.2 --> cordova-android 6.4.0 or 7.1.1
angular-ionic 4.0.0 --> cordova-android ?
Current demo project (‘tutorial’) seems to install android 6.2.3 by default, but a plugin requires 6.4.0. The latest is 7.1.1. What does the ionic team recommend/support?
Thank you!
UPDATE:
Thanks to Sujan12 and others, confirmed some discoveries and will continue to make notes.
Checked and indeed Cordova CLI 7 will install cordova-android 6.2.3 by default, which is not great, use at least 6.4.0 instead.
Updated to Cordova CLI 8 and it did install cordova-android 7.0.0 (Feb 2018). The latest 7.1.1 is Jul 2018 and since it’s been a month and no major issues I suppose it’s safe.
So instead of what is in the docs, the command should instead be
ionic cordova platform add android@7.1.1
I don’t think there is a general answer to this, and it’s far less an Ionic thing than it is a plugin thing. Various versions of various plugins work with certain cordova-android versions, and simply won’t with others. This is especially true of the difference between 6.x and 7.x, because they moved a bunch of stuff around internally.
1 Like
What cordova platform is installed is not defined by Ionic Framework (ionic-angular
) or Ionic CLI (ionic
) but purely by Cordova CLI (cordova
). The newest Cordova CLI 8.0.0 will install cordova-android 7.0.0
by default right now, but you should definitely use 7.1.0
. If you are getting 6.2.3, you are probably using an outdated Cordova CLI and should upgrade.
And to answer your question: If you don’t have a good reason not to, always use the latest.
If you update from cordova 6 to 7.1.1, you will have to change android-minSdkVersion
to 19 in config.xml
or the build will not work.