dtrejogo
dtrejogo

Reputation: 251

Google Play Services incompatible for Android 4.0.4

I'm building an app using google map v2, it requires google play services, so I added this validation to check for it:

        int checkGooglePlayServices = GooglePlayServicesUtil
                .isGooglePlayServicesAvailable(myContext);
        if (checkGooglePlayServices != ConnectionResult.SUCCESS) {
            // google play services is missing!!!!
          /*
           * Returns status code indicating whether there was an error.
           * Can be one of following in ConnectionResult: SUCCESS,
           * SERVICE_MISSING, SERVICE_VERSION_UPDATE_REQUIRED,
           * SERVICE_DISABLED, SERVICE_INVALID.
           */
            GooglePlayServicesUtil.getErrorDialog(checkGooglePlayServices,
                    myContext, REQUEST_CODE_RECOVER_PLAY_SERVICES).show();
        }

So it turns out I have a device 4.0.4 that didn't come with google play services (why? I dont know, but it has gmail, and maps working fine), when I run the app the validation works and takes me to play store to install/update google play services, however the page says: Your device isn't compatible with this version.

So how do I install google play service if it is not available on play store? is it common to have android devices without this app ?

thanks,

enter image description here

Upvotes: 3

Views: 22171

Answers (1)

ashoke
ashoke

Reputation: 6461

  • The error seems to suggest the play services version on your device is not compatible with the play services library used by your app. Where does it say the play services is not available on your device.

    To make sure the play services in running on your device, and to find out its version, look in Settings -> Apps -> Downloaded -> Google Play Services

Finding Google Play Services version

  • Since it is not giving you an option to update the play services on device, I would consider using a matching play services client library in your app. You can easily do this on Android studio build.gradle of the app module by adding exact version to your dependencies like so

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

    replace 5.0.89 with the version you find on your device.

Upvotes: 2

Related Questions