Skip to content

fix(sdk): Align AndroidX.Wear pins and Wear minSdk (backport #23993) - #23997

Merged
kazo0 merged 2 commits into
release/stable/6.7from
mergify/bp/release/stable/6.7/pr-23993
Aug 7, 2026
Merged

kazo0 merged 2 commits into
release/stable/6.7from
mergify/bp/release/stable/6.7/pr-23993

Conversation

@mergify

@mergify mergify Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

GitHub Issue: closes #23991

PR Type:

🐞 Bugfix

What changed? 🚀

A new unoapp with the Wear OS feature enabled fails to restore for net10.0-android with three NU1605 package-downgrade errors: Uno.Sdk pins Xamarin.AndroidX.Wear to 1.4.0.1 for net10.0, but that revision's dependency floors (RecyclerView ≥ 1.4.0.5, SwipeRefreshLayout ≥ 1.2.0.2, Fragment 1.8.9.2 → Activity ≥ 1.12.4.1) are all above the versions the SDK pins. The base (net9.0) pin 1.3.0.16 has the same problem against the base pin set, so net9.0-android was equally broken.

This PR makes the AndroidWear feature restore and build out of the box:

  • packages.json: pin AndroidXWear to the revisions that ship in the same dotnet/android-libraries wave as the rest of the pinned set — 1.3.0.14 (base) / 1.3.0.15 (net10.0). Down-pinning Wear keeps the change scoped to the Wear feature; raising the other AndroidX pins up to Wear 1.4.0.1's floors was validated and rejected, because Activity 1.12.x floors androidx.lifecycle 2.10 (minSdk 23), which breaks every default (minSdk 21) Android app, and on net9.0 it drags in the broken Compose.Runtime.Annotation 1.10.0.1 packaging wave (D8 duplicate-class failure).
  • Uno.Common.Android.targets: when the androidwear feature is enabled and SupportedOSPlatformVersion is not set explicitly, default it to 26.0 instead of 21.0 — Xamarin.AndroidX.Wear.Tiles brings in androidx.wear.protolayout, whose AAR requires minSdk 26 (manifest-merge AMM0000 otherwise).
  • validate-packages-json.ps1 (CI guard, second commit): in addition to the existing exists-on-NuGet check, validate that the pinned Xamarin.* set is mutually dependency-coherent per TFM pin set, by walking nuspec dependency floors (recursing through unpinned intermediates such as Fragment). This is exactly the gap the existing guard could not catch: 1.4.0.1 exists on NuGet, but is incoherent with the surrounding pins. On the pre-fix manifest the check reports 8 conflicts (4 per TFM set — including a Collection floor violation that a default app cannot surface); on this PR's manifest it passes.
  • android-wear.md: document the minSdk 26 default.

Validation (all runtime, Uno.Sdk 6.7.0-dev.165 with the changed files injected)

Scenario Before After
dotnet new unoapp -platforms android --includeAndroidWear, net10.0-android restore fails, 3× NU1605 restore + build clean (0 errors, 0 warnings)
Same app on net9.0-android restore fails, 3× NU1605 restore + build clean
Plain unoapp (no Wear), net10.0-android builds builds (pins for non-Wear apps unchanged — no blast radius)
CI guard on pre-fix packages.json passes (misses the bug) fails with 8 dependency conflicts, exit 1
CI guard on this PR's packages.json — passes, exit 0

PR Checklist ✅

  • 🧪 Added Runtime tests, UI tests, or a manual test sample (for bug fixes / features, if applicable) — covered by the CI guard's new dependency-coherence check, which fails on the pre-fix manifest and passes on this one
  • 📚 Docs have been added/updated following the documentation template (for bug fixes / features)
  • 🖼️ Validated PR Screenshots Compare Test Run results.
  • ❗ Contains NO breaking changes
  • 👀 Reviewed 2 other open pull requests (optional but appreciated!)

This is an automatic backport of pull request #23993 done by [Mergify](https://mergify.com).

@github-actions github-actions Bot added area/build Categorizes an issue or PR as relevant to build infrastructure kind/documentation area/sdk Categorizes an issue or PR as relevant to the Uno.Sdk labels Aug 7, 2026
@kazo0
kazo0 enabled auto-merge August 7, 2026 00:23
@unodevops

Copy link
Copy Markdown
Contributor

@kazo0
kazo0 disabled auto-merge August 7, 2026 00:59
@kazo0
kazo0 enabled auto-merge August 7, 2026 00:59
@kazo0

kazo0 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

@kazo0
kazo0 merged commit 759463f into release/stable/6.7 Aug 7, 2026
66 of 67 checks passed
@kazo0
kazo0 deleted the mergify/bp/release/stable/6.7/pr-23993 branch August 7, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Categorizes an issue or PR as relevant to build infrastructure area/sdk Categorizes an issue or PR as relevant to the Uno.Sdk kind/documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants