Add android-36.1 and android-37 to SDK provisioning API levels#34805
Closed
Add android-36.1 and android-37 to SDK provisioning API levels#34805
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://github.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34805Or
iex "& { $(irm https://github.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34805" |
Contributor
There was a problem hiding this comment.
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.1toAndroidSdkApiLevelsso provisioning installsplatforms;android-36.1. - Move the
IsDefault="True"marker from36to36.1to 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>
ba55abe to
b412e2e
Compare
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>
kubaflo
approved these changes
Apr 5, 2026
This was referenced Apr 5, 2026
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>
Member
Author
|
Superseded — changes applied to #34852 instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CI macOS builds fail with:
AndroidTargetFrameworkVersionwas bumped to36.1(via dotnet/android dependency updates in #34237), but theAndroidSdkApiLevelsprovisioning list ineng/Versions.propsonly went up to36.When CI runs with
onlyAndroidPlatformDefaultApis: true(the default), theProvisionAndroidSdkPlatformApiPackagestarget only installs the item markedIsDefault=True. That wasandroid-36, but the build now needsandroid-36.1.The provisioning runs:
which installs
platforms/android-36.1/android.jar— the exact file the build expects. (platforms;android-36.1is a valid sdkmanager package; Google ships non-integer API levels as separate platform packages.)Fix
android-36in the list (withoutIsDefault)android-36.1withIsDefault=Trueso CI installs itandroid-37for forward-compat (withoutIsDefault)Affected builds
dotnet-maui-build, Build macOS (Debug + Release)Related
android-37vsandroid-37.0)