Google Play services out of date. Requires 3159100 but found 3158130

In SDK tools Google Play services has updated to revision 9 (version 3159100) but the Google Api's (API 17) is still revision 3 and therefore only includes Google Play Services version 3158130

How to solve this issue??

LogCat message Google Play services out of date. Requires 3159100 but found 3158130

Thanks in Advance


Solution 1:

This is an issue with Google that arises when you update to SDK 18 (Jelly Bean 4.3) (which has now been resolved via update 21st October 2013 - see below) by Google :

https://code.google.com/p/android/issues/detail?id=57880#makechanges

It impacts Google API emulators for both 4.2.2 and 4.3 if you are running Google Play Services.

I'm not interested in a workaround or an "unofficial" solution. This is an error caused by Google and so I'm going to wait for them to fix it. When they do, I'll turn this response into a proper "answer".

This received 26th July 2013:

Comment #13 on issue 57880 by [email protected]: google play services updated but AVD not http://code.google.com/p/android/issues/detail?id=57880

We're working on this. I don't have an ETA yet other than the maddeningly vague "soon".

This received 1st August 2013:

Updates: Status: Assigned Owner: [email protected]

Comment #18 on issue 57880 by [email protected]: google play services updated but AVD not http://code.google.com/p/android/issues/detail?id=57880

The Play Services team knows about this issue and is working on it with a high priority. The fix for this will go in the same emulator image in the same timeframe. Sorry I'm being vague about when it'll go out; I don't want to tell you something and then have us miss it. I'll update this bug when I know more.

This is the final update on this issue (received October 21st 2013). This fix works fine for me on 4.3 - I haven't tried it on other flavours of Jelly Bean.

[email protected] via codesite.bounces.google.com Oct 21

to me Updates: Status: Released

Comment #45 on issue 57880 by [email protected]: google play services updated but AVD not http://code.google.com/p/android/issues/detail?id=57880

Solution 2:

You may want to check at runtime whether the GooglePlayServices are up-to-date on the device or not. If not, simply show the appropriate errorDialog that will prompt the user to update it.

private boolean isGooglePlayServicesAvailable() {
        GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();
        Integer resultCode = googleApiAvailability.isGooglePlayServicesAvailable(mContext);
        if (resultCode != ConnectionResult.SUCCESS) {
            Dialog dialog = googleApiAvailability.getErrorDialog(this, resultCode, 0);
            if (dialog != null) {
                dialog.show();
            }
            return false;
        }
        return true;
    }

Check the doc for further information : http://developer.android.com/google/play-services/setup.html