android – Google Play Services version 5.2.08 too recent for my device-ThrowExceptions

Exception or error:

I use this method to check the availability of play services:

private boolean checkPlayServices() {
    int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
    if (status != ConnectionResult.SUCCESS) {
        if (GooglePlayServicesUtil.isUserRecoverableError(status)) {
            showErrorDialog(status);
        } else {
            Toast.makeText(this, "This device is not supported.", Toast.LENGTH_LONG).show();
            finish();
        }
        return false;
    }
    return true;
}

status is now set to 2 when I run the app which indicates that the installed play services need an update, even though the play store has no update in store for the play services.

The dialog from the isUserRecoverableError invocation says:

Update Google Play services – This app won’t run unless you update
Google Play services

This is happening right after I updated my Android SDK through the SDK Manager which updated “Google Repository” (and not, if I recall correctly, “Google Play Services”, though that one was updated yesterday without any trouble).

Android Studio tells me that the play services version is 5.2.08.

What can I do? Can I for example force a lower version in the dependencies section?

compile 'com.google.android.gms:play-services:+'
How to solve:

Originally posted in the question


I specified the previous version I remember seeing in app/build.gradle and my app runs fine now:

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

###

Had to fix building using 5.0.89 too because my device won’t update the google play services.

Leave a Reply

Your email address will not be published. Required fields are marked *