简体   繁体   English

无法安装NuGet-Packages(Xamarin Android项目)

[英]Can't install NuGet-Packages (Xamarin Android project)

I have a problem with NuGet installing the "Xamarin.JOSE.JWT" package. 我有一个问题,NuGet安装“Xamarin.JOSE.JWT”包。 I get the following error: 我收到以下错误:

> Could not install package 'Xamarin.JOSE.JWT 1.0.3'. You are trying to
> install this package into a project that targets
> 'MonoAndroid,Version=v6.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.

Is this a known problem or is there a workaround for this? 这是一个已知问题还是有解决方法?

Xamarin.JOSE.JWT 1.0.3 does not support Xamarin.Android projects. Xamarin.JOSE.JWT 1.0.3不支持Xamarin.Android项目。 It only contains assemblies for .NET Framework 4.0. 它仅包含.NET Framework 4.0的程序集。

Your options are: 你的选择是:

  1. Find another NuGet package that does support Xamarin.Android projects. 找到另一个支持Xamarin.Android项目的NuGet包。
  2. See if you can compile the Xamarin.JOSE.JWT project against Xamarin.Android. 看看你是否可以针对Xamarin.Android编译Xamarin.JOSE.JWT项目。
  3. Open an issue on the Xamarin.JOSE.JWT GitHub repository. 在Xamarin.JOSE.JWT GitHub存储库上打开一个问题。
  4. Try directly referencing the jose-jwt.dll from the NuGet package and see if it works with an Android project. 尝试直接引用NuGet包中的jose-jwt.dll,看看它是否适用于Android项目。 This may not work if it is using parts of the .NET Framework not supported by Xamarin.Android. 如果它使用的是Xamarin.Android不支持的.NET Framework部分,则可能无法正常工作。
  5. Use the Xamarin.JOSE.JWT NuGet package on the server side and not in the Android project. 在服务器端使用Xamarin.JOSE.JWT NuGet包,而不是在Android项目中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM