

Xamarin.Forms and Essentials now target Android 13 (in Preview)
source link: https://devblogs.microsoft.com/xamarin/xamarin-forms-essentials-target-android13-preview/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Xamarin.Forms and Essentials now target Android 13 (in Preview)

Gerald Versluis
We are excited to announce that Xamarin.Forms and Xamarin.Essentials now target Android 13!
As of August 2023, new Android apps that are distributed through the Google Play Store will have to target at least Android 13. In a continued effort to keep supporting Xamarin.Forms, we have now updated Xamarin.Forms and Xamarin.Essentials to target MonoAndroid13 by default.
Since this is a bigger update than usual, we are putting out this preview release first.
.NET 7 and .NET MAUI already support Android 13. We encourage all new applications to begin with .NET MAUI since Xamarin support will end May 1, 2024. This release for Xamarin is intended to assist you through your upgrade transition to .NET MAUI. For more information about upgrading to .NET MAUI review our upgrade guides and check out the newly released .NET Upgrade Assistant extension for Visual Studio 2022.
Compatibility with AndroidX and Other Packages
The AndroidX binding packages and other dependencies you might have in your Xamarin.Forms app were already updated to target Android 12. Because of this, it was not possible to updated these packages beyond a certain point.
The dependencies that we have in place for Xamarin.Forms have now been updated to the latest available versions at this time. The one exception is Xamarin.AndroidX.Lifecycle, updating this package to 2.6.1 causes an issue which we are currently investigating.
Additionally, after updating you might see warnings in your build output that state something like “unknown enum constant Scope.LIBRARY_GROUP_PREFIX”. At the time of writing this is being investigated. This should however not prevent you from building your project.
Target Android 13 in your Xamarin.Forms Project
To begin targeting Android 13 with Xamarin.Forms and Xamarin.Essentials, follow these simple steps:
- Make sure that your machine has Xamarin.Android 13 installed, if you have Visual Studio 2022 17.3+ (released August 2022), you should be good.
- Update your Xamarin.Forms and Xamarin.Essentials NuGet packages to the latest version. Note that these versions are in preview right now, make sure to check the “Include prelease” checkbox in your NuGet package management screen. The versions you want to look for are Xamarin.Forms 5.0.0.2599-pre1 and Xamarin.Essentials 1.8.0-preview1.
- In your Android project’s
AndroidManifest.xml
, update thetargetSdkVersion
to33
(Android 13). - Rebuild your project and start testing if everything works as expected.
Xamarin Support Policy
While this change should make sure that you can keep working on your Xamarin.Forms apps a little longer, please do keep in mind that the support for all Xamarin products is ending on May 1st, 2024 as per our official support policy. For more detailed information, please read David’s blog post about the support timeline.
The future or cross-platform development based on C# and .NET is with .NET MAUI. For new projects we recommend to start with .NET MAUI directly. For existing projects, begin your upgrade with the .NET Upgrade Assistant that will help you upgrade your Xamarin.Forms projects to .NET MAUI.
A quote from the support policy:
Xamarin support will end on May 1, 2024 for all classic Xamarin SDKs. Android 13 will be the final version classic Xamarin.Android will target.
Have a look at our .NET MAUI documentation to help get you started.
Start Testing Today
As always, we appreciate your feedback and encourage you to report any issues on our GitHub repository.
If no major issues arise from the changes in these preview versions, we will release a stable version ahead of Google’s August 2023 deadline.
Happy coding!
Gerald Versluis Senior Software Engineer, .NET MAUI
Follow
Recommend
-
62
James July 12th, 2019 This week marked the launch of Xamarin.Essentials 1.2 packed full of new enhancements and optimizations. The main highlight is the new file preview features enabl...
-
11
Xamarin.Essentials 1.6 preview: macOS, media, and more!Xamarin.Essentials 1.6 preview: macOS, media, and more!
-
5
Forum› Xamarin.Forms We are excited to announce that the Xamarin Forums are moving to the new
-
14
Friday Five: Xamarin Essentials, Auto ML In Azure, More!%3CLINGO-SUB%20id%3D%22lingo-sub-1998693%22%20slang%3D%22en-US%22%3EFriday%20Five%3A%20Xamarin%20Essentials%2C%20Auto%20ML%20In%20Azure%2C%20More!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22l...
-
14
Access Battery and Energy Saver Information with Xamarin.Essentials192 views•Dec 21, 2020190ShareSave
-
9
Xamarin Essentials adds all kinds of useful APIs in a single NuGet package. Let's learn the basics of Xamarin essentials as we take a look! It’s normal to use different NuGet packages to add more functionalities when we are developing...
-
8
#XamarinEssentials #Maps #XamarinFormsOpen Native Maps Apps with Xamarin.Essentials and Xamarin.Forms
-
9
Xamarin.Essentials 1.7 and introducing .NET MAUI Essentials James
-
2
News Preview of .NET MAUI Community Toolkit Heralds Xamarin.Forms Sunsetting By
-
9
#Share #Essentials #ImageSharingShare Im...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK