-
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
Build with --gradleArg=-PcdvCompileSdkVersion=?? not working #657
Comments
The following change should resolve this issue but would interfere with changes proposed in #657: --- a/bin/templates/project/app/build.gradle
+++ b/bin/templates/project/app/build.gradle
@@ -122,6 +122,7 @@ if (ext.cdvReleaseSigningPropertiesFile == null && file('../release-signing.prop
ext.cdvBuildMultipleApks = cdvBuildMultipleApks == null ? false : cdvBuildMultipleApks.toBoolean();
ext.cdvVersionCodeForceAbiDigit = cdvVersionCodeForceAbiDigit == null ? false : cdvVersionCodeForceAbiDigit.toBoolean();
ext.cdvMinSdkVersion = cdvMinSdkVersion == null ? defaultMinSdkVersion : Integer.parseInt('' + cdvMinSdkVersion)
+ext.cdvCompileSdkVersion = Integer.parseInt('' + ext.cdvCompileSdkVersion)
ext.cdvVersionCode = cdvVersionCode == null ? null : Integer.parseInt('' + cdvVersionCode)
def computeBuildTargetName(debugBuild) { |
|
Hi @erisu your command is slightly different. I also have success with To reproduce please be sure to try with In case you do have success with I just updated the description with some more information about the issue with |
Another factor is that compileSdkVersion and targetSdkVersion are not always the same thing. I discovered a very interesting article at: https://medium.com/androiddevelopers/picking-your-compilesdkversion-minsdkversion-targetsdkversion-a098a0341ebd |
I've been delving into those gradleArgs myself for the past week and what I've discovered is that it works by providing |
Closing this ticket for the recent changes in Cordova-Android 10: #1212
|
For example:
produces an error like this:
same issue on cordova-android@latest (7.1.4), 7.0.0, and nightly (cordova-android@8.0.0-nightly.2019.2.10.a6f30b69)
ref: https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html#setting-gradle-properties
P.S. I discovered this issue during rework in response to review comments on PR #655.
P.P.S. This was observed in bash terminal on mac OS (10.13.6).
P.P.P.S. This is an issue with using
--gradleArg=-PcdvCompileSdkVersion=??
, not an issue with using--gradleArg=-PcdvMinSdkVersion=??
.I think this difference is due to the fact that
bin/templates/project/app/build.gradle
does the corrective casting forcdvMinSdkVersion
but not forcdvCompileSdkVersion
. (The corrective casting forcdvMinSdkVersion
was already done in PR #551.)The text was updated successfully, but these errors were encountered: