IsGooglePlayServicesAvailable always returns 2

I am trying to embed the Google Play Services library in my android app. But there is a problem with the isGooglePlayServicesAvailable function.

Although my game services are up to date, it returns 2, which means SERVICE_VERSION_UPDATE_REQUIRED according to the documentation.

My code is below:

protected void onResume() {
    int statusCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(LoginSigninActivity.this);
    if( statusCode != ConnectionResult.SUCCESS)
            Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(

            // If Google Play services can provide an error dialog
            if (errorDialog != null) {
            Toast.makeText(this, getString(R.string.toast_google_play_services_not_found),Toast.LENGTH_LONG).show();


Thanks in advance.

PS The error dialog is always displayed.


source to share

2 answers

No, it shouldn't be.

Android 4.4.4 device has version 5.0.89 playback service where when Android preview devices support 5.2.08 playback. This is the reason why android studio is asking to update the version of the game service to 5.2.08. So for now use

compile '' 


If you are using an Android emulator I think you should be using 5.2.08.

And if you want to update your game service to 5.2 see this .



I also had the same problem. I used the latest version of Game Services: 5. + to develop the application. But my device where Kitkat is using the game services version: 4.4.52. He always said SERVICE_VERSION_UPDATE_REQUIRED

because I am building an app that uses the upper version of the game service, but the device has a lower version.

My suggestion is to use the lower game version to develop your app, or use a device using the upper game version.



All Articles