Reputation: 893
When I create a Universal Blank App and attempt to upgrade my NuGet packages, it tells me
Could not install package 'Xamarin.Android.Support.v4 25.1.0'.
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.
I understand that I need an older version of Xamarin.Android.Support.v4, but I couldn't find any reference guide on which is the latest version of the NuGet package works for my build. Is there a place I can look to find this information ?
Upvotes: 0
Views: 707
Reputation: 13176
You can look at NuGet.org.
This error message is telling you that it requires MonoAndroid 6.0
to install into. This means that you need to set your <TargetFrameworkVersion>
to 6.0 or higher. This is also synonymous with setting your Android version to compile against 6.0.
Please note that you can support APIs all the way back to whatever your MinSdkVersion
is set to. It is not dependent of your TargetFrameworkVersion
, as this is a common misunderstanding.
My advice is to compile against the latest API version and to set your minimum API version to the lowest level you need to consider. You can read more about that here.
https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#considerations
Finally to see a historical version history of this library, you can simply search on NuGet.org:
https://www.nuget.org/packages/Xamarin.Android.Support.v4/
Please note that you will most likely need to download the lib via the download button on the side, extract the nupkg
and view inside the lib
folder which will be named the respective target you need.
Upvotes: 1