android - Google Play服务已过时。需要9683000但找到9452230

标签 android gradle android-gradle-plugin google-play-services

我已经在装有Android 5.1.1的手机上测试了我的android应用程序,并且一切正常,但是今天我在装有Android 5.0.2的平板电脑上对其进行了测试,并且收到以下警告,并且该应用程序无法运行其服务:
GooglePlayServicesUtil: Google Play services out of date. Requires 9683000 but found 9452230
这是我的gradle.build文件,一切似乎都是最新的。我已经检查了平板电脑的更新,似乎没有更新。

apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "24.0.2"

defaultConfig {
    applicationId "alpha"
    minSdkVersion 16
    targetSdkVersion 24
    versionCode 1
    versionName "1.0.2"
    multiDexEnabled true
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

lintOptions {
    abortOnError false
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])

compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.google.code.gson:gson:2.7'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.google.android.gms:play-services-location:9.6.1'

testCompile 'junit:junit:4.12'
testCompile 'org.powermock:powermock-api-mockito:1.6.4'
testCompile 'org.mockito:mockito-core:1.10.19'
}

关于如何解决问题的任何想法,谢谢!

编辑

如果有任何帮助,这是来自adb shell的完整logcat:
W/ResourceType: Failure getting entry for 0x01080ad0 (t=7 e=2768) (error -75)
D/PhoneWindow: *FMB* installDecor mIsFloating : false
D/PhoneWindow: *FMB* installDecor flags : 8454400
V/ActivityThread: updateVisibility : ActivityRecord{37623128 token=android.os.BinderProxy@149bad0e {alpha.MainActivity}} show : true
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@149bad0e time:8624348
W/GooglePlayServicesUtil: Google Play services out of date.  Requires 9683000 but found 9452230

最佳答案

如果平板电脑的Google Play服务是最新的,则您可能没有最新的SDK版本。

  • 转到SDK Manager并打开独立的SDK Manager
  • 更新Android SDK工具,Android SDK平台工具和Android SDK生成工具。

  • 希望将检查引用的库,并且此后您将不会遇到问题。

    关于android - Google Play服务已过时。需要9683000但找到9452230,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40003360/

    相关文章:

    android - 打开键盘会破坏布局

    android - 无法写入 Android 中的 SQLite 数据库

    java - Gradle:如果我将依赖项从 "implementation"更改为 "runtime"并且项目仍在编译,是否会有问题?

    java - 如何处理Gradle和多项目配置?

    android - gradle Exec block 不应因非零输出而失败

    android - 为什么我不能在这里使用 getBaseContext()?

    android - 通过 NFC 将数据从 Android 设备传输到 PC

    java - 简单的 Java 应用程序可以与 Ant 配合使用,但不能与 Maven 配合使用。我该怎么做才能纠正这个问题?

    android - 无法为 'dialog' 创建组件,原因 : java. awt.HeadlessException

    android - 什么是 android.enableD8=false 的替代方案,因为它已被弃用