Share via

Android 12 SDK not available in Visual Studio 2019

Shukla, Shweta 1 Reputation point
Mar 21, 2022, 6:59 AM

As per the documentation https://learn.microsoft.com/en-us/xamarin/android/release-notes/12/12.0, it is mentioned that Android 12 is available from Visual Studio 2019 16.11.
I have Visual Studio 2019 16.11.11, still i don't see Android 12 option under Approved List Repository, while it is available when I select full list.

185018-visual-studio-2019.png

Since Android 12 is Released now, I expect it to be available under Approved List.
Is it that Android 12 is not yet approved by Microsoft?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,378 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rob Caplan - MSFT 5,632 Reputation points Microsoft Employee
    Mar 22, 2022, 8:13 PM

    Xamarin.Android 12.0 has a dependency on JDK 11, which has some compatibility issues with Visual Studio 2019. You can use it, but it is not turned on by default.

    This is discussed in the Android 12 release notes you linked:

    Support Android 12
    Android 12 adds a number of new APIs in API-31, which are now available when $(TargetFrameworkVersion)=v12.0.

    There is unfortunate related fallout: API-31 requires JDK-11, and using JDK-11 with Visual Studio 2019 is problematic; in particular, using JDK-11 will break the Android Designer. If Android 12/API-31 must be used with Visual Studio 2019, please keep in mind that tradeoffs are involved.

    Android 12/API-31 support is improved in Visual Studio 2022 and Xamarin.Android 12.1.

    JDK 11 is further discussed at https://github.com/xamarin/xamarin-android/wiki/JDK-11-Warning

    This special casing is not needed in Visual Studio 2022, and newer versions of Xamarin.Android are available only in Visual Studio 2022.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.