Ad

Ionic / Cordova - How To Set The 'Requires Android' Version In Play Store?

- 1 answer

How to set the Requires Android version in Play Store? It is always 4.4 for all Ionic / Cordova Android Apps. (See Play Store app details)

Screenshot

The preference android-minSdkVersion in config.xml is set to 22 (Android 5.1). Also android-targetSdkVersion has no effect. And I found nothing in the developer section of Play Store.

Ad

Answer

Cordova does not use/respect the minSdkVersion of the config.xml correctly.

Workaround: Go to the directory platforms/android and replace the defaultMinSdkVersion property value of build.gradle. That's it.

The platforms directory is untracked by default (gitignore). It's recommended. No problem. You can replace this value by a build / task tool e.g. Jenkins. Or just place an additional gradle file build-extras.gradle into this folder to overwrite some values.

Update

Cordova Android 8.0.0 fixed this issue. Now minSdkVersion of config.xml is respected. See Release Notes

Ad
source: stackoverflow.com
Ad