Skip to content
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

Compile SDK / Target SDK version not consistent with defaults in root build.gradle #631

Closed
brodycj opened this issue Jan 18, 2019 · 7 comments
Labels

Comments

@brodycj
Copy link

brodycj commented Jan 18, 2019

If I would do cordova platform add android@nightly in a new Cordova project and then do cordova build android, the APK has target SDK version 27 while SDK 28 is specified as default in:

defaultTargetSdkVersion=28 //Integer - We ALWAYS target the latest by default
defaultCompileSdkVersion=28 //Integer - We ALWAYS compile with the latest by default

I used the following command to check the SDK versions in the APK:

aapt list -a platforms/android/app/build/outputs/apk/debug/app-debug.apk | grep SdkVersion

This issue may be related to #508 - Inconsistent handling of min/target SDK values

I hope we can resolve this one before the next major release for Cordova 9 (apache/cordova#10).

P.S. I expanded the scope of this issue to cover the compile SDK version. This issue needs to be resolved before we can continue with AndroidX support (#565).

@brodycj
Copy link
Author

brodycj commented Jan 31, 2019

I think this should be done before we try to resolve the issue with AndroidX (#565).

I think this issue is similar to #508 (Inconsistent handling of min/target SDK values) and needs to be solved in the Gradle scripts. The solution may be related to PR #633 (quick fix for #508).

/cc @davidschreiber

@brodycj brodycj changed the title Target SDK version not consistent with defaults in root build.gradle Compile SDK / Target SDK version not consistent with defaults in root build.gradle Jan 31, 2019
@brodycj
Copy link
Author

brodycj commented Jan 31, 2019

I am expanding the scope of this issue to cover the compile SDK version, as @davidschreiber pointed out in apache/cordova-plugin-camera#418 (comment) and apache/cordova-plugin-camera#418 (comment). As I said before:

@brodycj brodycj mentioned this issue Jan 31, 2019
brodycj pushed a commit to brodycj/cordova-android that referenced this issue Feb 10, 2019
- remove defaultTargetSdkVersion which was never used
- comment out defaultBuildToolsVersion & defaultCompileSdkVersion
  with notes that these values should be defined and used
  someday in the future

Resolves apache#658
Resolves apache#631
@erisu
Copy link
Member

erisu commented Apr 6, 2019

@brodybits I think we can close this ticket now as PR #699 is merged into master.
Is my assumption correct?

@brodycj
Copy link
Author

brodycj commented Apr 7, 2019

I am not yet convinced that PR #699 resolves this issue, which I think is better described by #658.

I would like to test it to be absolutely sure.

Unfortunately I cannot promise when I will get a chance to test it due to some other priorities. Leaving it up to your best judgment for now.

@erisu
Copy link
Member

erisu commented Apr 8, 2019

@brodybits I can continue to look into this.

I have a plan for another PR which will refactor the Gradle process but the amount of work might not fit into this release version. I will see what can be done in patch/minor releases and keep the major changes in a seperate PR.

From the ticket, you linked

the following default values seem to be ignored:

  • defaultBuildToolsVersion
  • defaultTargetSdkVersion
  • defaultCompileSdkVersion

defaultTargetSdkVersion and defaultCompileSdkVersion should be used now from my last PR.

defaultBuildToolsVersion was the only one I left out as I was looking at it around the Gradle refactor planning.

@erisu
Copy link
Member

erisu commented Apr 8, 2019

For this ticket, I can do some additional testing around Target and Compiled SDK.
As for the build tool version, that will be handled in the other ticket.

@erisu
Copy link
Member

erisu commented Jul 21, 2021

Closing this ticket as resolved in Cordova-Android 10.

#1212

@erisu erisu closed this as completed Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants