AndroidX NuGet Packages are Stable!
Last year, we introduced AndroidX for Xamarin. In addition to that, today we are happy to bring you stable AndroidX NuGet packages!
Furthermore, since AndroidX is a big transition for your Android projects, we have also introduced a number of ways to migrate your Xamarin Android projects.
AndroidX NuGet Migration Tooling
There are three migration steps to be aware of regarding your application.
- Your application includes Android Support Library namespaces in need of migration to AndroidX namespaces. Use the
Migrate to AndroidXIDE tooling to handle most namespace scenarios.
First, enable the
AndroidX Migrator inside Visual Studio 2019 Preview 16.5+ via:
Tools > Options > Xamarin > Android Settings. (You can skip this step on Visual Studio for Mac 8.5+)
Next, right-click your project and Migrate to AndroidX.
Note: You will need to make some manual namespace changes for a few scenarios our tool doesn’t cover. While we will map the correct package for you, we encourage you to review the official artifact mappings. As well as the class mappings to help with your project migration.
- Your application includes any dependencies that have not been migrated to the AndroidX namespace. Use the Android Support Library to AndroidX Migration package.
- Your application does not include any dependencies that require AndroidX namespace migration. Use the AndroidX libraries available on NuGet today.
How This May Affect You
The majority of packages you know and love have already migrated to AndroidX on Android 10 and above. Starting with Xamarin.Forms 4.5, AndroidX will replace the Android Support Libraries. Additionally, once this is supported in Xamarin.Forms, we will migrate Xamarin.Essentials to AndroidX.
As everything slowly migrates to AndroidX in favor of the Support Libraries, we will make our “out-of-box” IDE experience the default to using AndroidX and Android 10.
Try the AndroidX NuGet Packages Today
We are continuously improving this experience and want to know your thoughts! For any issues with AndroidX or Xamarin, please file an issue on Developer Community. You may also file an issue within the Xamarin AndroidX GitHub repository.
Additionally, share any suggestions for how we can improve the AndroidX experience by filing a suggestion on Developer Community.
Lastly, check out our Xamarin AndroidX Migration GitHub repository for some tips and tricks in using the package, known issues, and limitations!