firebase - Xamarin.Firebase.Messaging - 无法安装包

标签 firebase xamarin xamarin.forms

我正在尝试安装 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 是同义的。

https://www.nuget.org/packages/Xamarin.Firebase.Messaging/

关于firebase - Xamarin.Firebase.Messaging - 无法安装包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42810045/

相关文章:

c# - Xamarin.Android 与安卓

ios - 如何使用 Xamarin IOS 获取可用内部存储空间

firebase - 将批量 Json 导入 Firebase

android - MvvmCross Android fragment 添加到后台堆栈

android - 防止第三方库获取我的推送通知

ios - 使用 Mvvmcross 将分组数据绑定(bind)到 Xamarin 中的 UITableview

c# - 无法让 ListView 显示初始选择的项目

c# - 单击更改 ViewCell 元素

firebase - 是否可以在 Flutter 中使用 FCM 实现通知分组/捆绑?

javascript - Firebase:在 FirebaseAuth 中创建的新用户上触发 Firestore 中的事件