0
votes

I'm trying to run an Xamarin.Android project into Visual Studio 2019. But i get the error 'Unsupported or invalid $(TargetFrameworkVersion) value of 'v4.0.3'.' Seems that the Android SDK 4.0.3 (API 15) is installed, but not available for VS2019 as a target framework.

The setup is: Visual Studio 2019 Xamarin 16.3 Xamarin.Android SDK 10.0

Q: Is the support for the Android API 15 has been dropped for VS2019?

1
VS 2019 does not support API 15 any more .So you should set the Minimun Android Version as at least Android 5.0(API 21) . - Lucas Zhang
@LucasZhang-MSFT Any reference to some official document? For me the Android 4.4 (API 19) is available. - kalitsov

1 Answers

0
votes

The support for the lower then Android API 19 version has been removed in Xamarin.Android 9.2

Removal of target framework versions below Android 4.4 (API level 19)

As cautioned by the related build warning that was added in the Xamarin.Android 9.1 release (see GitHub PR 2329), Xamarin.Android 9.2 removes support for the v2.3, v4.0.3, v4.1, v4.2, and v4.3 values of the $(TargetFrameworkVersion) MSBuild property. Projects that have one of these old target framework versions selected will now need to change it to v4.4 or higher.

@LucasZhang-MSFT pointed me into the right direction, so thank you!