问题
i've got a problem with the google-play-service. I'm using the Google-API for oAuth2 Authentication and Calendar/Gmail Information. Yesterday all worked fine, but today he tells me that i need a newer Version of Google PLay Service. Android Studio had updated any packages this morning. Here is the Error-Line from Logcat if i start to contact the GoogleAPI:
09-22 11:59:01.692: W/GooglePlayServicesUtil(2819): Google Play services out of date. Requires 9683000 but found 9452480
Here is my grade.build:
apply plugin: 'com.android.application'
android {
signingConfigs {
config {
keyAlias XXXXX
keyPassword XXXX
storeFile file(XXXX)
storePassword XXXXX
}
}
compileSdkVersion 23
buildToolsVersion '22.0.1'
defaultConfig {
applicationId XXXX
minSdkVersion 14
targetSdkVersion 22
signingConfig signingConfigs.config
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.config
}
debug {
debuggable false
jniDebuggable false
signingConfig signingConfigs.config
renderscriptDebuggable false
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile('com.google.api-client:google-api-client-android:1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.google.apis:google-api-services-gmail:v1-rev48-1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.google.apis:google-api-services-calendar:v3-rev212-1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.google.firebase:firebase-crash:9.6.0'
compile 'joda-time:joda-time:2.4'
compile 'com.google.android.gms:play-services-auth:9.6.0'
compile 'pub.devrel:easypermissions:0.1.5'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:support-vector-drawable:23.4.0'
}
apply plugin: 'com.google.gms.google-services'
I'm always using com.google.android.gms:play-services-auth Version 9.6.0. I dont get where i can change the version.
I tried to Toast out my Version number and it gaves me 213XXXX with:
int test = R.integer.google_play_services_version;
String test2 = test+"";
Toast.makeText(this,test2, Toast.LENGTH_SHORT).show();
But the Error Messages shows me different version numbers:
09-22 13:28:26.145: W/GooglePlayServicesUtil(3334): Google Play services out of date. Requires 9683000 but found 9452480
Many thanks, j. Doe ;)
回答1:
I think there is an open issue about the error that you receive "Google Play Services out of date on API 23" Also, this kind of issue came out during 2013 when you update your SDK to 18. Just check the link of this issue to know more about it.
What can I suggest you is update your dependency on the latest version. After you update it, create a new virtual device/emulator when testing the application. Try to use the x86-64 version of API 23.
来源:https://stackoverflow.com/questions/39638586/google-play-service-out-of-date-error