Earlier this week, the Xamarin team published the announcement that Xamarin.Forms and Xamarin.Essentials have been updated to target Android 13, aligning with Google's requirement for new Android apps to target at least Android 13 starting from August 2023. The update, which is currently in preview, aims to ensure compatibility with the latest Android version and provide a smooth transition to the future of cross-platform development, .NET MAUI.
The update brings Xamarin.Forms and Xamarin.Essentials in line with the MonoAndroid13 target by default, allowing developers to take advantage of the latest features and improvements offered by Android 13. To facilitate the upgrade process, a preview release has been made available, enabling developers to test their apps and prepare for the transition.
While Xamarin support is set to end on May 1, 2024, developers are encouraged to embrace .NET MAUI, which already supports Android 13. .NET MAUI offers an enhanced ecosystem for cross-platform development, providing a seamless transition from Xamarin to the future of .NET-based development. Detailed upgrade guides and the newly released ".NET Upgrade Assistant" extension for Visual Studio 2022 can assist developers in migrating their apps to .NET MAUI.
The Xamarin.Forms update also includes compatibility enhancements for AndroidX binding packages and other dependencies. While most packages have been updated, Xamarin.AndroidX.Lifecycle
remains at version 2.6.1 due to a known issue under investigation. Developers may encounter warnings in their build output related to the "unknown enum constant Scope.LIBRARY_GROUP_PREFIX
," and in an announcement post, the author, Gerald Versluis, states that the issue is currently being investigated.
As reported, few steps need to be done in order to begin targeting Android 13 with Xamarin.Forms and Xamarin.Essentials. The first one is that developers need to ensure they have Xamarin.Android 13 installed, update their NuGet packages to the latest preview versions (Xamarin.Forms 5.0.0.2599-pre1 and Xamarin.Essentials 1.8.0-preview1), and update the targetSdkVersion
in their Android project's AndroidManifest.xml to 33 (Android 13). Lastly, rebuilding the project will allow developers to test the functionality and compatibility of their apps.
As stated earlier, the support for Xamarin products concludes on May 1, 2024, based on that the developers should consider transitioning to .NET MAUI for future cross-platform projects. In the original announcement post, the team states that starting new projects directly with .NET MAUI is recommended while existing Xamarin.Forms projects can be upgraded using the .NET Upgrade Assistant.
The .NET MAUI documentation provides comprehensive resources to assist developers in adopting this next-generation framework.
In addition to an original post, in the comment section, a user named Anderson Damasio expressed excitement about Xamarin.Forms and support which is still getting. On May 15, 2023, the user wrote the following comment:
It’s great to know that there’s an investment in Xamarin Forms. We know that there are a large number of developers with the platform.
Congratulations
With Xamarin.Forms and Xamarin.Essentials now targeting Android 13 (in preview), developers can embrace the latest Android features while preparing for the transition to .NET MAUI. The update ensures compatibility and provides time for developers to migrate their projects. As the preview versions undergo testing, a stable release is expected ahead of Google's August 2023 deadline. The community members are also invited to visit the official GitHub project repository and learn more and provide valuable feedback.