【问题标题】:Google Play services out of date. Requires 10084000 but found 9879470. Can't updateGoogle Play 服务已过时。需要 10084000 但找到 9879470。无法更新
【发布时间】:2016-12-12 11:43:28
【问题描述】:

我正在使用 Firebase 制作一个 Android 应用程序。这些是导致问题的行:

dependencies {
    compile 'com.google.firebase:firebase-core:10.0.1'
    compile 'com.google.firebase:firebase-auth:10.0.1'

我收到此错误:

Google Play services out of date.  Requires 10084000 but found 9879470. 

我在模拟器上运行应用程序。似乎无法在模拟器上更新 GPS,因为它没有 Google Play 商店。

在 SDK Manager 中,显示 Google Player 服务的版本是 38。

也没有明显的更新方法。

【问题讨论】:

    标签: android firebase


    【解决方案1】:

    2017 年 2 月 28 日更新:API 25 的第 4 版模拟器映像已发布,可供下载。它包含支持 Firebase 10.2.0 的 Google Play Services 10.2.98。


    尚未针对 API 25 发布支持 Firebase 10.0.1 的模拟器系统映像。API 23 的 Rev 19 系统映像确实支持 10.0.1。

    您有三个选择:

    1. 等待发布支持 10.0.1 的 API 25 模拟器系统映像
    2. 使用 API 23 系统映像的 Rev 19 创建一个仿真器设备。在独立 SDK 管理器中,模拟器图像按 API 分组,名称类似于“Google APIs...系统图像”。确保您已安装 Rev 19。
    3. 在您的构建中,降级到以前版本的 Firebase 以允许使用 API 25 模拟器映像。

    运行模拟设备时,您可以通过转到设置 > 应用并选择 Google Play 服务来查看已安装的 Google Play 服务版本。

    【讨论】:

    • 谢谢。我尝试将 gradle 中的版本从 10.0.1 更改为设置 > 应用程序 > Google Play 服务中给出的版本。报错,找不到这个版本。
    • @B 是的,分配版本号似乎有不同的方案。尝试将您的 Firebase 和 Play 服务库降级到 9.8.0。
    • 谢谢你,成功了。你能解释一下为什么那个确切的版本有效,而不是其他任意版本吗?
    • 您应该可以使用 9.8.0 或 prior versions 中的任何一个:9.6.1、9.6.0、9.4.0 等。
    【解决方案2】:

    我只是通过更改依赖项的版本来解决它。只需使用:

    compile 'com.google.firebase:firebase-core:9.6.0'
    compile 'com.google.firebase:firebase-auth:9.6.0'
    

    【讨论】:

      猜你喜欢
      • 2017-07-12
      • 2013-07-25
      • 2013-02-15
      • 2019-09-23
      • 2015-08-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多