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?
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)
I resolved by adding making below settings under Android Project-->Properties and changing target versions
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With