【问题标题】:Xamarin Google Play Services missing?缺少 Xamarin Google Play 服务?
【发布时间】:2015-10-20 15:08:15
【问题描述】:

我正在尝试让 Google Cloud Messaging 在 Visual Studio 2012 中的 Xamarin Forms Android 应用程序中运行,而 GoogleApiAvailability.Instance.IsGooglePlayServicesAvailable(this) 调用返回错误代码 1(缺少服务)。我确保已安装 NuGet 包(否则命名空间不可用)并且 Android SDK 管理器已安装 Google Play 服务。

我还需要做什么才能使服务可用?

编辑 10/20 下午 1:34

当我在设备上通过 USB 调试应用程序时,IsGooglePlayServicesAvailable() 返回成功代码

【问题讨论】:

    标签: android xamarin xamarin.android xamarin.forms


    【解决方案1】:

    我的问题是我试图使用 Android SDK 附带的模拟器,而不是 Xamarin Android Player https://xamarin.com/android-player

    请记住,如果您需要使用 Google Play 服务https://university.xamarin.com/resources/how-to-install-google-play-on-android-emulator

    ,您还需要安装 Google Play 商店应用并更新它

    【讨论】:

    • @John Russo 我也面临同样的问题。我在 Xamarin 中收到 MissingMethodException。我正在使用设备,但仍然遇到相同的异常。你能告诉我如何解决这个问题吗?
    • @IngridCooper 你确定 Google Play 更新了吗? (Xamarin 大学链接的第 8 步)
    • @John Russo 是的,我检查了 Google Play 商店和 Google Play 服务。我的 Google Play 商店版本是 5.10.30,Google Play 服务是 8.3.01
    猜你喜欢
    • 2016-09-22
    • 2012-11-26
    • 2014-10-31
    • 2016-12-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多