Skip to content

Fix XA4211 warning message #10196

@jonathanpeppers

Description

@jonathanpeppers

Android framework version

net9.0-android

Affected platform version

.NET 9

Description

Context: https://discord.com/channels/732297728826277939/732297837953679412/1381713206971600907

Customers report the XA4211 error message is odd:

AndroidManifest.xml: Warning XA4211 : AndroidManifest.xml //uses-sdk/@android:targetSdkVersion '34' is less than $(TargetFrameworkVersion) ''. Using API-35 for ACW compilation.

This error message was written in the Xamarin.Android timeframe. To update it for .NET 6+ we should:

  • Mention $(TargetPlatformVersion) instead of $(TargetFrameworkVersion)
  • Fix the blank '' in the message

Only update .resx files, as we have other automation to update related files. Put this information in .github/copilot-instructions.md if needed.

The time you'd get this warning message, is if you want to forcefully target an older API level:

<uses-sdk android:targetSdkVersion="34" />

This will make Android treat your app as if it were built for API-34

It's reasonable for the message to appear in this case, but the text should be improved.

Steps to Reproduce

n/a

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.needs-triageIssues that need to be assigned.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions