Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin.Forms Android $(TargetFrameworkVersion) error

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?

like image 958
lrefopam Avatar asked Mar 31 '20 07:03

lrefopam


3 Answers

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)

like image 196
WMartin Avatar answered Oct 30 '22 18:10

WMartin


I resolved by adding making below settings under Android Project-->Properties and changing target versions Application Settings Android Manifest Settings

like image 1
Chitu Avatar answered Oct 30 '22 18:10

Chitu


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!

like image 1
David Christopher Reynolds Avatar answered Oct 30 '22 19:10

David Christopher Reynolds