无法在xamarin android项目中安装nuget软件包

无法在xamarin android项目中安装nuget软件包,xamarin,xamarin.forms,xamarin.android,Xamarin,Xamarin.forms,Xamarin.android,关于在xamarin android项目中安装NuGet软件包,我面临一个非常奇怪的问题。当我试图在xamarin android项目中安装任何NuGet软件包时,会出现一个错误 下面是我从NuGet包管理器收到的错误消息 ?Restoring packages for E:\Projects\Sample\Sample1\Sample2\Smaple3\SampleApp.Android\SampleApp.Android.csproj... NU1202: Package Microsoft

关于在xamarin android项目中安装NuGet软件包,我面临一个非常奇怪的问题。当我试图在xamarin android项目中安装任何NuGet软件包时,会出现一个错误

下面是我从NuGet包管理器收到的错误消息

?Restoring packages for E:\Projects\Sample\Sample1\Sample2\Smaple3\SampleApp.Android\SampleApp.Android.csproj...
NU1202: Package Microsoft.WindowsAPICodePack.Shell 1.1.0 is not compatible with monoandroid81 (MonoAndroid,Version=v8.1). Package Microsoft.WindowsAPICodePack.Shell 1.1.0 supports: net (.NETFramework,Version=v0.0)
NU1202: Package Microsoft.WindowsAPICodePack.Core 1.1.0 is not compatible with monoandroid81 (MonoAndroid,Version=v8.1). Package Microsoft.WindowsAPICodePack.Core 1.1.0 supports: net (.NETFramework,Version=v0.0)
Package restore failed. Rolling back package changes for 'SampleApp.Android'.
Time Elapsed: 00:00:01.9192186
========== Finished ==========

Android项目中已安装的软件包:


从您的PCL中删除Microsoft.WindowsAPICodePack,因为您在PCL中有它的引用,然后您的Android项目引用了类似于间接引用的PCL,因此它会导致问题


解决方案:从PCL项目中删除程序包

从PCL中删除Microsoft.WindowsAPICodePack,因为您在PCL中有一个对它的引用,然后您的Android项目引用了与间接引用类似的PCL,因此导致了问题


解决方案:从PCL项目中删除该软件包

此软件包与mono.android不兼容。您无法使用iThanks进行工作。我当时试图更新xamarin.forms版本,但也出现了上述错误。这让我很恼火。你为什么还需要APICodePack呢?我没有在android项目中安装这个软件包。它只安装在pcl项目中。根据错误,它应该在您的android项目中。请查看此软件包与mono不兼容。android您不能使用itThanks进行工作。我当时试图更新xamarin.forms版本,但也出现了上述错误。这让我很恼火。你为什么还需要APICodePack呢?我没有在android项目中安装这个软件包。它只安装在pcl项目中。根据错误,它应该在您的android项目中查看