我在 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
。
为了让这些包更新,我还缺少另一个步骤吗?
最佳答案
正如 Jon Douglas 所说,API 27 实际上需要 Android 8.1。如果您没有切换到 8.1 的选项,则需要更新 Visual Studio。完成后,您应该能够通过 Android SDK 管理器(工具 -> Android -> Android SDK 管理器)安装 8.1 SDK。
安装 SDK 后,您可以将 Target Framework
设置为 8.1 并更新 Nuget 包。
关于c# - Nuget 无法安装 Xamarin.Android.Support.Animated.Vector.Drawable 27.0.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49663469/