无法安装 Xamarin.Android.Support.v4 [英] Cannot install Xamarin.Android.Support.v4

查看:35
本文介绍了无法安装 Xamarin.Android.Support.v4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将此特定软件包安装到我的程序中,但出现以下错误:

I am trying to install this particular package into my program and get the following error:

错误无法安装包'Xamarin.Android.Support.Compat24.2.1'.您正在尝试将此软件包安装到以MonoAndroid,Version=v6.0"为目标的项目中,但该软件包不包含与之兼容的任何程序集引用或内容文件框架.如需更多信息,请联系软件包作者.

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.

我的项目支持目标到底是什么,我该如何进行此更改?我已经安装了 android 7,但是由于某些奇怪的原因我什至无法定位它.即使我制作了一个新项目,我也不能以此为目标.

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.

推荐答案

这个包需要安装 MonoAndroid70.因此,您需要确保您的 TargetFrameworkVersion 设置为最低 Android 7.0.您需要安装 API 24(7.0) 并更改版本.

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

对于那些对如何找到它感兴趣的人,可以从 NuGet 下载 .nupkg:

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

然后您可以提取 .nupkg 并查看 lib 文件夹,该文件夹将显示库支持的内容.

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

这篇关于无法安装 Xamarin.Android.Support.v4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆