Skip to content

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

Closed
PureWeen wants to merge 1 commit intonet11.0from
fix/android-36.1-provisioning
Closed

Add android-36.1 and android-37 to SDK provisioning API levels#34805
PureWeen wants to merge 1 commit intonet11.0from
fix/android-36.1-provisioning

Conversation

@PureWeen
Copy link
Copy Markdown
Member

@PureWeen PureWeen commented Apr 3, 2026

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 (via dotnet/android dependency updates in #34237), but the AndroidSdkApiLevels provisioning list in eng/Versions.props only went up to 36.

When CI runs with onlyAndroidPlatformDefaultApis: true (the default), the ProvisionAndroidSdkPlatformApiPackages target only installs the item marked IsDefault=True. That was android-36, but the build now needs android-36.1.

The provisioning runs:

dotnet android sdk install --package "platforms;android-36.1"

which installs platforms/android-36.1/android.jar — the exact file the build expects. (platforms;android-36.1 is a valid sdkmanager package; Google ships non-integer API levels as separate platform packages.)

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)

Affected builds

Related

Copilot AI review requested due to automatic review settings April 3, 2026 20:07
@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://github.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34805

Or

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

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

Updates the Android SDK provisioning configuration to ensure CI installs the platform matching the repo’s bumped AndroidTargetFrameworkVersion (36.1), preventing macOS build failures due to a missing android.jar.

Changes:

  • Add 36.1 to AndroidSdkApiLevels so provisioning installs platforms;android-36.1.
  • Move the IsDefault="True" marker from 36 to 36.1 to align “default API” provisioning with the current TFM.

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>
@PureWeen PureWeen force-pushed the fix/android-36.1-provisioning branch from ba55abe to b412e2e Compare April 3, 2026 20:14
@PureWeen PureWeen changed the title Add android-36.1 to SDK provisioning API levels Add android-36.1 and android-37 to SDK provisioning API levels Apr 3, 2026
PureWeen added a commit that referenced this pull request 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

- #34805 — net11.0 target
- dotnet/android#11072 — same class of issue for API 37
- dotnet/android#10536 — non-integer API level support fixes

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen pushed a commit that referenced this pull request Apr 7, 2026
Keep android-36 in the list (without IsDefault), add android-36.1 with
IsDefault=True so CI installs it, and add android-37 for forward-compat.

Supersedes #34805.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PureWeen
Copy link
Copy Markdown
Member Author

PureWeen commented Apr 7, 2026

Superseded — changes applied to #34852 instead.

@PureWeen PureWeen closed this Apr 7, 2026
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.

3 participants