cordova-android: cdvMinSdkVersion seems to not work in 7.1.4
I specified this <preference name="android-minSdkVersion" value="23" />
into config.xml
, but it seems not work in 7.1.4
.
I think these PRs might cause this problem.
- https://github.com/apache/cordova-android/pull/495/files
- https://github.com/apache/cordova-android/pull/551/files
I quickly fix this line to
ext.cdvMinSdkVersion = cdvMinSdkVersion == null ? null : Integer.parseInt('' + defaultMinSdkVersion)
.
It seems to work well.
I think actual cdvMinSdkVersion
is set on this line.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 10
- Comments: 18 (9 by maintainers)
FYI: The workaround is to specify
gradleArg
when you build.cordova build android -- --gradleArg=-PcdvMinSdkVersion=23
This will override
minSdkVersion
. I confirmed it works on7.1.4
.You can confirm whether it works well using
aapt
command.aapt l -a path/to/apk/android-release.apk | grep 'minSdkVersion'
I solved changing lines in file: platforms/android/gradle.properties
to
I’m seeing something like this after upgrading to v8 from v7.x, not sure if that’s expected.
Symptoms:
It seems like a minimum SDK < 19 is no longer supported so I changed my preference in
config.xml
:When I build (
cordova build android
) I get the following warning (which eventually causes the build to fail):When I search through the AndroidManifest.xml files under platforms/android everything is saying 19, so the merge has worked but it seems like there is a gradle property sticking around somewhere. (FYI I know almost nothing about the internals of gradle or the Android build process 😕 .)
I’m going to try @falcon8823 's workaround for now.
Update from my notes:
@eddskt Yes, that worked for me
@dmastag Yes, that worked for me