[android] 20250618 net10.0 ecosystem updates#30059
Conversation
038034b to
ed990e6
Compare
This is WIP, it currently errors with:
src\Core\src\Handlers\Toolbar\ToolbarHandler.Android.cs(101,21): error CS7069: Reference to type 'ISavedStateRegistryOwner' claims it is defined in 'Xamarin.AndroidX.SavedState', but it could not be found
src\Core\src\Platform\Android\MauiAppCompatActivity.cs(43,6): error CS7069: Reference to type 'ISavedStateRegistryOwner' claims it is defined in 'Xamarin.AndroidX.SavedState', but it could not be found
src\Core\src\Platform\Android\Navigation\StackNavigationManager.cs(468,9): error CS7069: Reference to type 'ISavedStateRegistryOwner' claims it is defined in 'Xamarin.AndroidX.SavedState', but it could not be found
src\Core\src\Platform\Android\Navigation\StackNavigationManager.cs(468,9): error CS8602: Dereference of a possibly null reference.
src\Core\src\Platform\Android\ContextExtensions.cs(467,9): error CS7069: Reference to type 'ISavedStateRegistryOwner' claims it is defined in 'Xamarin.AndroidX.SavedState', but it could not be found
This mainly updates Xamarin.AndroidX.Navigation.* packages to a new
2.9.0 version from Google.
Going a step further from the recent update in adfe0ec, I continued
to refactor and remove MSBuild properties like
`$(_XamarinAndroidGlideVersion)` that dependabot won't be able to
update.
Removed:
* `$(_XamarinAndroidGlideVersion)`
* `$(_XamarinAndroidXSecurityVersion)`
* `$(_XamarinGoogleCryptoTinkAndroidVersion)`
* `$(XamarinGooglePlayServicesMaps)`
The versions of these packages are now tracked in a single location,
`AndroidX.targets`, that dependabot can update. Example [here][0].
[0]: jonathanpeppers/boots@c190ed4
ed990e6 to
0be3ced
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR updates Android ecosystem packages to support .NET 10.0, consolidating package version management in a single location to enable better dependency management. The changes primarily focus on updating Xamarin.AndroidX.Navigation.* packages to version 2.9.0 and removing MSBuild properties that dependabot cannot update.
- Consolidates AndroidX package version management in
AndroidX.targetsfor better dependency tracking - Updates multiple AndroidX Lifecycle and Navigation packages to newer versions
- Removes MSBuild variables like
$(_XamarinAndroidGlideVersion)in favor of centralized version management
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/Workload/Microsoft.Maui.Sdk/Microsoft.Maui.Sdk.csproj |
Removes obsolete MSBuild property replacements for Android packages |
src/Core/tests/Benchmarks.Droid/Benchmarks.Droid.csproj |
Updates Glide package reference to use centralized versioning |
src/Core/src/Core.csproj |
Adds new AndroidX Lifecycle packages and updates Glide reference |
src/Core/maps/src/Maps.csproj |
Updates Google Play Services Maps to use centralized versioning |
src/Controls/Foldable/src/Controls.Foldable.csproj |
Adds new AndroidX Lifecycle packages for foldable support |
src/Compatibility/Maps/src/Android/Compatibility.Maps.Android.csproj |
Adds AndroidX Lifecycle packages and updates Maps reference |
src/Compatibility/Android.AppLinks/src/Compatibility.Android.AppLinks.csproj |
Adds AndroidX Lifecycle packages for app links functionality |
eng/Versions.props |
Removes MSBuild variables that are now managed centrally |
eng/NuGetVersions.targets |
Removes package version overrides that are now in AndroidX.targets |
eng/AndroidX.targets |
Centralizes all AndroidX package versions and adds new dependencies |
| <PackageReference Include="Xamarin.AndroidX.Lifecycle.Runtime.Ktx" /> | ||
| <PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModel.Ktx" /> | ||
| <PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModelSavedState" /> | ||
| <PackageReference Include="Xamarin.AndroidX.SavedState" /> |
There was a problem hiding this comment.
Adding Xamarin.AndroidX.SavedState package is potentially a breaking change as it introduces new dependencies to the public API. Please alert reviewers that this may be a breaking change and ensure it's not included in minor versions or service releases.
There was a problem hiding this comment.
Xamarin.AndroidX.SavedState was already brought in, but we have to list it to get the fix:
|
@rmarinho who knows about this test? The only thing I can think of is
|
|
Talked with @PureWeen and this seems to be a flaky test. |


This mainly updates Xamarin.AndroidX.Navigation.* packages to a new 2.9.0 version from Google.
Going a step further from the recent update in adfe0ec, I continued to refactor and remove MSBuild properties like
$(_XamarinAndroidGlideVersion)that dependabot won't be able to update.Removed:
$(_XamarinAndroidGlideVersion)$(_XamarinAndroidXSecurityVersion)$(_XamarinGoogleCryptoTinkAndroidVersion)$(XamarinGooglePlayServicesMaps)The versions of these packages are now tracked in a single location,
AndroidX.targets, that dependabot can update. Example here.