【问题标题】:Google Play services out of date. Requires 11910000 but found 11577470Google Play 服务已过时。需要 11910000 但找到 11577470
【发布时间】:2017-12-31 12:40:56
【问题描述】:

我正在尝试将 Firebase 包含在我的 Android 项目中。运行它,抛出这个错误:

Google Play services out of date.  Requires 11910000 but found 11577470

我在这里找到了几个关于此的链接,其中大多数都说要降级到:

compile 'com.google.android.gms:play-services:9.6.0'

这不再适用于我,因为我使用 SDK 26,它会引发与其他库不兼容的错误。

这是我的 gradle 文件: (模块):`

dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0'
    classpath 'com.google.gms:google-services:3.1.1'
}

`应用程序:

android {
compileSdkVersion 26
defaultConfig {
    applicationId "com.example.project"
    minSdkVersion 24
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.android.gms:play-services:11.8.0'

} 应用插件:'com.google.gms.google-services'

And as you can see here my Google Services is updated as well.

在我的日志中出现以下错误:

I/FirebaseCrash: Sending crashes
W/FirebaseInstanceId: No response
E/FirebaseInstanceId: Topic sync failed: TIMEOUT
E/FirebaseInstanceId: Topic sync failed: SERVICE_NOT_AVAILABLE
W/FirebaseInstanceId: No response
E/FirebaseInstanceId: Topic sync failed: TIMEOUT

有谁知道我该如何解决这个问题?任何提示表示赞赏。谢谢。

【问题讨论】:

  • 我也有这个问题

标签: android firebase incompatibility google-play-services


【解决方案1】:

我遇到了同样的问题,不得不使用谷歌应用程序向下移动到 API 21 模拟器图像。那个是最新的,并且有效。

【讨论】:

  • 这尤其是我不想做的..我真的更喜欢使用 26 或 27
【解决方案2】:

这意味着您设备上的 Play Services APK 比您在应用中请求的版本旧。

如果这是一个模拟器,您需要使用名称中带有“Google Play”的模拟器,而不是“Google API”。后者总是落后于计划,需要完整的图像更新才能获得最新的 Play 服务版本,而前者为您提供 Play 商店,它将为您更新 Play 服务。如果这是设备,请更新this app

顺便说一句,如果 Play 服务不可用,您应该在应用中显示通知或对话框。看看如何check for availability

【讨论】:

  • 我已经在 Google Play 上使用过所有东西了?至少 sdk 管理器中的更新。我更新了其他 Google Play 服务(许可库和 APK 扩展库),但仍然出现同样的错误
  • 不,您必须更新设备或模拟器上的 Play Services。
猜你喜欢
  • 2013-07-25
  • 2013-02-15
  • 2019-09-23
  • 2015-08-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多