-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cdvMinSdkVersion seems to not work in 7.1.4 #599
Comments
Please verify what you see in <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="27" /> |
I just upgraded from 7.1.1 to 7.1.4 and had the same issue. |
If the minSdkVersion is specified as part of the gradle build, it will override whatever is listed in AndroidManifest.xml |
It looks like a default value must have begun overriding that build parameter recently. I added a gradle.properties file with a |
I just added the bug label, will need further investigation and maybe another patch fix. |
This problem is caused by https://github.com/apache/cordova-android/pull/495/files#diff-6e8bcecf29cf2fd3cbafdc8d406476fbR120 always setting a default minSdkVersion in gradle, which overrides whatever is specified in AndroidManifest.xml. This is the same concern I raised in #508 |
We cannot fix #508 in a patch release, and maybe not even in a minor release. |
Right. By "next release" I had meant "next major release", just updated the comment to make it clear. I am afraid we would have to revert the update from #495 in 7.1.x to resolve this issue in a patch release. Any better ideas? |
Would the Solution be to move back to 7.1.2 while this is fixed ? |
@dmastag Yes, that worked for me |
I cannot promise this will ever be fixed in a patch release. I personally do not have any extra time to make such a patch release and I think not other committers will have the extra time either. The only way I can think of to fix this in a patch release would be to revert 00134cf (cherry-pick of PR #495) in 7.1.x. This would be a breaking change for people who configure via Gradle as described in [1], which would be a step backward. For future releases such as upcoming Cordova 9 (apache/cordova#10) I would say the minimum & target SDK should be configured as described in [1], not by setting the preferences in config.xml. [1] https://cordova.apache.org/docs/en/latest/guide/platforms/android/#setting-gradle-properties |
FYI: The workaround is to specify
This will override You can confirm whether it works well using
|
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
When I build (
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:
|
Another solution? |
I solved changing lines in file:
to
|
@eddskt Yes, that worked for me |
Unable to reproduce this on master, I believe this was fixed by #699 Using the
Note: The value is in hex, A: android:minSdkVersion(0x0101020c)=(type 0x10)0x17 |
I specified this
<preference name="android-minSdkVersion" value="23" />
intoconfig.xml
, but it seems not work in7.1.4
.I think these PRs might cause this problem.
cordova-android/bin/templates/project/app/build.gradle
Line 125 in a68f9fd
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.cordova-android/bin/templates/project/app/build.gradle
Line 171 in a68f9fd
The text was updated successfully, but these errors were encountered: