Xamarin.Forms and Essentials Target Android 13

2023-07-14 · 2 min read

Starting in August 2023, all new Android apps distributed through the Google Play Store are required to target at least Android 13. As part of ongoing efforts to support Xamarin.Forms, the Xamarin development team has updated Xamarin.Forms and Xamarin.Essentials to target Mono Android 13 by default.

.NET 7 and .NET MAUI already support Android 13. Developers are encouraged to build or start new apps using .NET MAUI, as support for Xamarin will officially end on May 1, 2024.

This Xamarin release is intended to help ease the transition to .NET MAUI. For more details on migrating to .NET MAUI, refer to the upgrade guide and check out the newly released .NET Upgrade Assistant extension for Visual Studio 2022.

Compatibility with Android XCompatibility with Android X

Android X binding packages and other dependencies in Xamarin.Forms applications have been updated to target Android 12. Dependencies used by Xamarin.Forms have now been updated to the latest versions currently available.

Targeting Android 13Targeting Android 13

Here’s a simple way to start targeting Android 13 with Xamarin.Forms and Xamarin.Essentials:

  1. Ensure that Xamarin.Android 13 is installed on your machine. If you’re using Visual Studio 2022 version 17.3 or later (released in August 2022), you’re good to go.
  2. Update your Xamarin.Forms and Xamarin.Essentials NuGet packages to the latest versions.
  3. In your Android project, update the targetSdkVersion in the AndroidManifest.xml file to 33 (Android 13).
  4. Manually edit your Android project’s .csproj file to set TargetFrameworkVersion to v13.0.
  5. Rebuild all projects and verify that everything runs as expected.

Xamarin Support PolicyXamarin Support Policy

While these changes help ensure that you can continue using Xamarin.Forms applications, keep in mind that support for all Xamarin products will officially end on May 1, 2024, as outlined in the official support policy. For more details and timelines, please read David’s blog post on Xamarin’s support schedule.