Skip to content

Add android-36.1 and android-37 to SDK provisioning API levels#34806

Merged
PureWeen merged 1 commit intorelease/11.0.1xx-preview3from
fix/android-36.1-provisioning-p3
Apr 3, 2026
Merged

Add android-36.1 and android-37 to SDK provisioning API levels#34806
PureWeen merged 1 commit intorelease/11.0.1xx-preview3from
fix/android-36.1-provisioning-p3

Conversation

@PureWeen
Copy link
Copy Markdown
Member

@PureWeen PureWeen commented Apr 3, 2026

Backport of #34805 to preview3.

Problem

CI macOS builds fail with:

XA5207: Could not find android.jar for API level 36.1
Expected: /Users/builder/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-36.1/android.jar

AndroidTargetFrameworkVersion was bumped to 36.1 but the provisioning list only had android-36. When CI runs with onlyAndroidPlatformDefaultApis: true, only the IsDefault item gets installed via dotnet android sdk install --package "platforms;android-36.1".

Fix

  • Keep android-36 in the list (without IsDefault)
  • Add android-36.1 with IsDefault=True so CI installs it
  • Add android-37 for forward-compat (without IsDefault)

Related

AndroidTargetFrameworkVersion was bumped to 36.1 but the provisioning
list only went up to 36. CI macOS builds fail with XA5207 because the
provisioning step (ProvisionAndroidSdkPlatformApiPackages) only installs
the IsDefault item, which was android-36. The build expects
platforms/android-36.1/android.jar which doesn't exist.

The fix:
- Keeps android-36 in the list (without IsDefault)
- Adds android-36.1 with IsDefault=True (so CI installs it)
- Adds android-37 for forward-compat (without IsDefault)

When onlyAndroidPlatformDefaultApis=true (the CI default), only the
IsDefault item is installed via:
  dotnet android sdk install --package "platforms;android-36.1"

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 3, 2026 20:15
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34806

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34806"

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Backports the XA5207 CI provisioning fix by updating the Android SDK API levels list so the default provisioned platform API matches the repo’s current AndroidTargetFrameworkVersion (36.1).

Changes:

  • Move IsDefault="True" from API level 36 to 36.1.
  • Add API level 37 to the provisioning list for forward compatibility.

@PureWeen PureWeen merged commit 427de00 into release/11.0.1xx-preview3 Apr 3, 2026
7 of 16 checks passed
@PureWeen PureWeen deleted the fix/android-36.1-provisioning-p3 branch April 3, 2026 20:31
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

Successfully merging this pull request may close these issues.

2 participants