Xamarin.Forms Android $(TargetFrameworkVersion) error
Solution 1
Posting this as an answer for other people since I almost missed it in the comments. Credit to @FreakyAli
Right-click on Android Project>Properties>Application>Compile using Android version change this to v9 or above and see if that works
On VS Mac it can be found on the General section. (right click android project>Options>General)
Solution 2
I had to manually change the references to the TargetFrameworkVersion in the csproj file to get it to update properly. For some reason there were several references to this value in the .csproj file, all with different values!
Solution 3
I resolved by adding making below settings under Android Project-->Properties and changing target versions
lrefopam
Updated on June 25, 2022Comments
-
lrefopam almost 2 years
I upgraded Xamarin.Forms in my old project to v4.5.0.495. When I try to start my app in an Android simulator, I receive the following error:
XF005: The $(TargetFrameworkVersion) for App.Android (v8.1) is less than the minimum required $(TargetFrameworkVersion) for Xamarin.Forms (9.0). You need to increase the $(TargetFrameworkVersion) for App.Android. (XF005)
After this, I increased the version in the project options to Android 10.0 (API level 29), but the error occurs again. VS is up to date. Has anyone experienced the same error?