c# - Nuget 无法安装 Xamarin.Android.Support.Animated.Vector.Drawable 27.0.2

标签 c# visual-studio xamarin xamarin.android nuget

我在 Xamarin.Android 项目中更新已安装的 Nuget 包时遇到问题。运行更新时,出现以下错误:

Could not install package 'Xamarin.Android.Support.Animated.Vector.Drawable 
27.0.2'. You are trying to install this package into a project that targets 
'MonoAndroid,Version=v8.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.

快速的谷歌搜索产生了几个结果,答案与 this question 中的相似。 .似乎我只需要确保我的 Target Framework 设置得足够高。

instructions found here 之后我打算更改 Visual Studio 2017 中的 Target Framework,但我发现它已经设置为使用 8.0

Target framework already set!

为了让这些包更新,我还缺少另一个步骤吗?

最佳答案

正如 Jon Douglas 所说,API 27 实际上需要 Android 8.1。如果您没有切换到 8.1 的选项,则需要更新 Visual Studio。完成后,您应该能够通过 Android SDK 管理器(工具 -> Android -> Android SDK 管理器)安装 8.1 SDK。

Android SDK manager screenshot

安装 SDK 后,您可以将 Target Framework 设置为 8.1 并更新 Nuget 包。

关于c# - Nuget 无法安装 Xamarin.Android.Support.Animated.Vector.Drawable 27.0.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49663469/

相关文章:

visual-studio - VS2010设置可执行数据

c# - .gitignore 仍然包含文件

c# - 循环中的随机数

c++ - VS C++ 中 'Windows Console Application' 和 'Empty Project' 的区别

c# - 如何将 .net 类序列化到磁盘

ios - Xamarin 检测文本字段的程序更改

xamarin - 如何在 Xamarin Studio 中展开/折叠代码区域

xamarin - 如何在 Xamarin Forms WebView 中加载本地 HTML 文件

c# - 非托管资源和 Dispose()

c# - 如何删除Windows窗体应用程序中的标题栏