我正在尝试安装 Xamarin.Firebase.Messaging 我收到此错误:
Could not install package 'Xamarin.Firebase.Messaging 42.1001.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259', 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.
我尝试将目标配置文件更改为 78,但什么也没发生。
感谢您的帮助!
最佳答案
您正在尝试将此软件包安装到 PCL 项目中。您只能将此包安装到 Xamarin.Android
项目中,因为没有可以将此 NuGet 包安装到 PCL 中的目标。
有两种主要方法可以解决这个问题:
1)查看NuGet上的“依赖项”
2) 下载.nupkg
,解压,然后在库中查看支持的目标框架
在这种情况下,仅支持 MonoAndroid70
。这与面向 API 24 最低版本的 Xamarin.Android
是同义的。
关于firebase - Xamarin.Firebase.Messaging - 无法安装包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42810045/