Xamarin-更新nuget包导致错误 [英] Xamarin - Updating nuget packages caused errors
问题描述
我创建了一个跨平台应用程序(Xamarin.Forms)"应用程序,然后我立即去更新了nuget包(这是我被告知要做的).然后我尝试构建它,不仅我遇到了一些与更新的软件包有关的错误(请参见下面的信息),而且我也遇到了代码错误.我向上帝发誓我根本没有接触过项目的代码,这就是我得到的:
I created a "Cross-Platform App (Xamarin.Forms)" app, and i immediately went and update the nuget packages (this is what i was told to do). Then i tried to built it, and not only I got several errors(see bellow) that were about the updated packages, I had code errors as well. I swear the God that i didn't touch the code of the project at all, and here is what I get:
我用谷歌搜索,但是我找不到一个干净的解决方案.我只是退出此(非专业)产品的第一步,因为我无法运行现成的模板.对于这些可笑的错误,有人可以给我一些建议吗?
I googled, but i couldn't find out a clean solution for this. I am just one step before quitting this (unprofessional) product, because i cannot run the ready template. Is there someone that can give me a piece of advice for these ridiculous errors ?
推荐答案
无法安装软件包"Xamarin.XXXXXXX".您正在尝试将此软件包安装到针对'MonoAndroid,Version = vX.X'的项目中
Could not install package 'Xamarin.XXXXXXX'. You are trying to install this package into a project that targets 'MonoAndroid,Version=vX.X'
此错误表明,您需要将编译目标框架"至少增加到7.0.
You need to increase your "Compile Target Framework" to at least 7.0 as this error indicates.
您可以通过查看特定软件包的Dependencies
部分,在Nuget.org网站上查看该软件包的依赖性:
You can review the dependancies of a package on the Nuget.org site by looking at the Dependencies
section of a particular package:
另一个至少需要MonoDroid 8.0的SO问题/答案示例:
Another SO question/answer example that requires at least MonoDroid 8.0:
Xamarin.Android.Support.v4 27.0.x.x
至少需要将MonoAndroid 8.1
设置为编译目标框架:
这篇关于Xamarin-更新nuget包导致错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!