【问题标题】:Can't install GooglePlayServices.Base package for Xamarin.Forms project无法为 Xamarin.Forms 项目安装 GooglePlayServices.Base 包
【发布时间】:2018-03-07 10:38:39
【问题描述】:

所以我有一个cross-platform 项目(IOS and Android),我需要为我的Android 项目安装GooglePlayServices.Base NuGetpackage,但是在尝试这样做时出现此错误:

包还原失败。回滚“MyApp.Android”的包更改。

我知道这是版本不兼容的错误,但我不知道具体在哪里。

这里是项目所有组件的版本:

  • Xamarin.Forms 2.5.1.317207-pre1

  • 项目属性>应用>使用android版本编译:Android 8.0 (Oreo).

  • Xamarin.GooglePlayServices.Base v60.1142.0(需要安装)。

有人说只有 GooglePlayServices.Base 32.940.0-beta3 适用于 Xamarin.Forms,但这个也不适用于我。

有什么想法吗?!

更新:

我可以安装 Xamarin.GooglePlayServices.Base v42.1021.1,但我需要在我的代码中使用 GcmClient,而这又需要 v60.1142.0

【问题讨论】:

  • 有什么消息吗?同样的问题。
  • 嗨@ArneNöhre,不是真的,仍在使用v42.1021.1,因此无法实现推送通知。

标签: android xamarin xamarin.forms google-play-services nuget-package


【解决方案1】:

仅供将来参考,以防万一其他人遇到此问题,如果您查看 nuget 包管理器控制台输出,您实际上可以在那里看到解决方案。就我而言,错误消息是:

Version conflict detected for Xamarin.GooglePlayServices.Basement. Install/reference Xamarin.GooglePlayServices.Basement 60.1142.1 directly to project LoyaltyWorx.Android to resolve this issue. 
 LoyaltyWorx.Android -> Xamarin.GooglePlayServices.Base 60.1142.1 -> Xamarin.GooglePlayServices.Basement (= 60.1142.1) 
 LoyaltyWorx.Android -> LoyaltyWorx -> Plugin.PushNotification 1.3.0 -> Xamarin.Firebase.Messaging 60.1142.0 -> Xamarin.GooglePlayServices.Basement (= 60.1142.0).

因此我开始安装 Xamarin.GooglePlayServices.Basement 60.1142.1

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-03-03
    • 1970-01-01
    • 2017-01-27
    • 1970-01-01
    • 2020-09-17
    • 2021-02-08
    • 1970-01-01
    相关资源
    最近更新 更多