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

Clearer information which targetSdkVersion is used #9643

Open
AlleSchonWeg opened this issue Dec 21, 2024 · 1 comment
Open

Clearer information which targetSdkVersion is used #9643

AlleSchonWeg opened this issue Dec 21, 2024 · 1 comment
Assignees

Comments

@AlleSchonWeg
Copy link

Android framework version

Other

Affected platform version

VS 2022

Description

This old issue shows that for devs is not clear which targetSdkVersion a maui project target: #8331
In the csproj we set something like this:
<TargetFramework>net8.0-android</TargetFramework>
and the compiler generates the <uses-sdk/> node in the manifest with a android:targetSdkVersion="xx" value. The docs: https://learn.microsoft.com/en-us/dotnet/maui/migration/android-projects?view=net-maui-9.0#changes-to-androidmanifestxml mention that Net8.0-android is shorthand for net8.0-android34.0. But also that net8.0-android35.0 is possible when a binding is available for the next Android release.

Steps to Reproduce

The problem is we don't know when a new binding is available and with <TargetFramework>net8.0-android</TargetFramework> we could compile with targetSdkVersion 35 after a VS/Maui update.
We need a better info what is finally set in the manifest. It is important, because we have to test our app.

Did you find any workaround?

No response

Relevant log output

@AlleSchonWeg AlleSchonWeg added the needs-triage Issues that need to be assigned. label Dec 21, 2024
@jpobst
Copy link
Contributor

jpobst commented Dec 21, 2024

Is your concern that in a future update net8.0-android may change from meaning net8.0-android34.0 to net8.0-android35.0?

That will not happen, net8.0-android will always mean net8.0-android34.0 no matter what additional level(s) are released in the future. This is intentional as we explicitly do not want a VS/Maui update to change what Android API level an app is targeting.

Changing the Android API level should be something that a user must manually opt into.

@jpobst jpobst removed the needs-triage Issues that need to be assigned. label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants