Skip to content

Restore fails with NU1605 (AndroidX package downgrades) when the Wear OS feature is enabled #23991

Closed

Description

@khaskoul

Current behavior 🐛

A new unoapp created with the Wear OS feature fails to restore for net10.0-android, with three package downgrade errors:

error NU1605: Warning As Error: Detected package downgrade: Xamarin.AndroidX.RecyclerView from 1.4.0.5 to 1.4.0.3.
   AutoWear -> Xamarin.AndroidX.Wear 1.4.0.1 -> Xamarin.AndroidX.RecyclerView (>= 1.4.0.5)
   AutoWear -> Xamarin.AndroidX.RecyclerView (>= 1.4.0.3)

error NU1605: Warning As Error: Detected package downgrade: Xamarin.AndroidX.SwipeRefreshLayout from 1.2.0.2 to 1.1.0.29.
   AutoWear -> Xamarin.AndroidX.Wear 1.4.0.1 -> Xamarin.AndroidX.SwipeRefreshLayout (>= 1.2.0.2)
   AutoWear -> Xamarin.AndroidX.SwipeRefreshLayout (>= 1.1.0.29)

error NU1605: Warning As Error: Detected package downgrade: Xamarin.AndroidX.Activity from 1.12.4.1 to 1.10.1.3.
   AutoWear -> Xamarin.Google.Android.Material 1.12.0.5 -> Xamarin.AndroidX.Fragment 1.8.9.2 -> Xamarin.AndroidX.Activity (>= 1.12.4.1)
   AutoWear -> Xamarin.AndroidX.Activity (>= 1.10.1.3)

NU1605 is warning-as-error by default, so this blocks at restore — nothing builds.

Root cause

Uno.Sdk pins Xamarin.AndroidX.Wear to 1.4.0.1 for net10.0, but the AndroidX packages that version depends on are pinned lower than its own dependency floors.

targets/netstandard2.0/packages.json (Uno.Sdk 6.7.0-dev.158), net10.0 overrides:

Group Uno.Sdk net10.0 pin
AndroidXWear 1.4.0.1
AndroidXRecyclerView 1.4.0.3
AndroidXSwipeRefreshLayout 1.1.0.29
AndroidXActivity 1.10.1.3

Xamarin.AndroidX.Wear 1.4.0.1 .nuspec requires:

<dependency id="Xamarin.AndroidX.RecyclerView"        version="1.4.0.5" />
<dependency id="Xamarin.AndroidX.SwipeRefreshLayout"  version="1.2.0.2" />
<dependency id="Xamarin.AndroidX.Fragment"            version="1.8.9.2" />

…and Xamarin.AndroidX.Fragment 1.8.9.2 in turn requires Xamarin.AndroidX.Activity >= 1.12.4.1, which is what pulls the third downgrade in via the Material -> Fragment -> Activity chain.

So all three errors trace to the AndroidXWear pin having been moved to 1.4.0.1 without the AndroidX packages it depends on being raised alongside it.

Expected behavior 🎯

The generated project restores and builds for Android without modification

How to reproduce it (as minimally and precisely as possible) 🔬

  1. dotnet new unoapp -n WearApp -platforms android --includeAndroidWear (or tick Wear OS in the wizard).
    • Equivalent on an existing app: add AndroidWear to <UnoFeatures>.
  2. dotnet restore WearApp (or dotnet build).
  3. Restore fails with the three NU1605 errors above.

100% reproducible. Removing AndroidWear from <UnoFeatures> makes all three disappear; adding it back reproduces them.

Workaround 🛠️

No response

Renderer 🎨

  • Skia
  • Native

Affected platforms 📱💻🖥️

No response

Uno.Sdk version (and other relevant versions) 📦

Uno.Sdk 6.7.0-dev.158
Uno.Templates 6.7.0-dev.158
TargetFramework net10.0-android
Microsoft.Android.Sdk.Windows 36.1.43
OS Windows 11 Pro 26200

IDE version 🧑‍💻

No response

Anything else we need to know? 💬

No response

Activity

  1. added theissue type on Aug 6, 2026
  2. added
    triage/untriaged
    on Aug 6, 2026
  3. modified the milestone: Platform 6.7 on Aug 6, 2026
  4. self-assigned this
    on Aug 6, 2026
  5. added a commit that references this issue on Aug 7, 2026
    bcaec52
  6. added a commit that references this issue on Aug 7, 2026
    37a9230
  7. self-assigned this
    on Aug 7, 2026
  8. khaskoul commented on Aug 12, 2026

    @khaskoul
    Author

    Fix verified with:
    Templates/SDK: 6.7.10
    Platform(s): Desktop
    VS VSIX: 6.7.5
    IDE: VS 18.4.6
    OS: Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

triage/untriaged

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions