我一直在使用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
答案 0 :(得分:0)
如果平板电脑的Google Play服务是最新的,您可能没有最新的SDK版本。
希望我们会检查引用的库,之后你就不会遇到这个问题了。