Search code examples
androidxamarinxamarin.androidvisual-studio-2019

Error: Your project does not reference "MonoAndroid,Version=v5.0" framework


I have installed Xamarin on Visual Studio 2019 I started the first Android project

TaregtFramework

I have sent the target framework in the picture The project has nothing but two simple buttons I get this error when I try to rebuild

Error Prictre

Thank you for helping me find the problem

Fixing this error and why the MonoAndroid version file shows 0.0.0.0


Solution

  • First, you can check whether the Nuget package supports the MonoAndroid version v5.0.

    Second, from the Xamarin.Android 5.1, there is no mono.Android.Support.v4, so you need to change it to Xamarin.Android.Support.v4.

    Third, you can check the Setting up the Android SDK for Xamarin.Android to set the right version.