Cannot install Xamarin.Android.Support.v4

android, nuget, package, xamarin

Solution

This package requires `MonoAndroid70` to be installed. Thus you need to ensure your `TargetFrameworkVersion` is set to a minimum of Android 7.0. You will need to install API 24(7.0) and change the version.

https://developer.xamarin.com/guides/android/application_fundamentals/understanding_android_api_levels/#framework

For those interested in how you would find this, you can download the `.nupkg` from NuGet:

https://www.nuget.org/api/v2/package/Xamarin.Android.Support.v4/24.2.1

You can then extract the `.nupkg` and view the `lib` folder which will show you what the library supports.

Problem

I am trying to install this particular package into my program and get the following error: Error Could not install package 'Xamarin.Android.Support.Compat 24.2.1'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v6.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. What exactly is my project suppost to target and how do I make this change? I already installed android 7, however I cannot even target that for some strange reason. Not even if I make a new project I can't target that.

Original source