Xamarin - Updating nuget packages caused errors

╄→尐↘猪︶ㄣ 提交于 2020-01-10 05:17:05

问题


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 ?


回答1:


Could not install package 'Xamarin.XXXXXXX'. You are trying to install this package into a project that targets 'MonoAndroid,Version=vX.X'

You need to increase your "Compile Target Framework" to at least 7.0 as this error indicates.

You can review the dependancies of a package on the Nuget.org site by looking at the Dependencies section of a particular package:

  • https://www.nuget.org/packages/Xamarin.Android.Support.v7.AppCompat/

Another SO question/answer example that requires at least MonoDroid 8.0:

  • https://stackoverflow.com/a/49138485/4984832

Example:

Xamarin.Android.Support.v4 27.0.x.x requires at least MonoAndroid 8.1 to be set as the Compile Target Framework:




回答2:


You have to use newer android SDK version. You can download the SDK from android SDK manager and then select it from project properties



来源:https://stackoverflow.com/questions/49140677/xamarin-updating-nuget-packages-caused-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!