17

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

Devendar
  • 323
  • 1
  • 4
  • 20

10 Answers10

18

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 sba...@google.com: 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: sba...@google.com

Comment #18 on issue 57880 by sba...@google.com: 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.

android@googlecode.com via codesite.bounces.google.com Oct 21

to me Updates: Status: Released

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

IanB
  • 3,489
  • 1
  • 20
  • 24
16

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

thanhbinh84
  • 17,876
  • 6
  • 62
  • 69
Nerkatel
  • 1,805
  • 16
  • 25
  • @Nerkatel - thanks for the info.. but i tried to update my sdk so many times to update .. but still showing same thing – Devendar Jul 25 '13 at 12:45
  • I can't, but I guess you could. – Chetna Jul 25 '13 at 12:45
  • I am unsure but I think http://stackoverflow.com/questions/15156301/google-play-services-out-of-date-requires-3025100-but-found-2012110 and http://stackoverflow.com/questions/15171684/gmail-login-google-play-service-out-of-date and this http://stackoverflow.com/questions/17675514/google-play-services-out-of-date-on-a-virtual-machine are all related to your question. – Chetna Jul 25 '13 at 12:53
  • @Chetna - not related to my question.. even i am not able to seen update on SDK tools – Devendar Jul 25 '13 at 12:55
  • This is a frustrating problem caused by Google. Despite updating everything I'm getting the same error. The question is right, older answers on similar questions don't work. – Bilbo Baggins Jul 31 '13 at 09:27
  • `GooglePlayServicesUtil.isGooglePlayServicesAvailable` is deprecated. – osayilgan Jun 11 '15 at 23:01
  • `GooglePlayServicesUtil.isGooglePlayServicesAvailable` is deprecated. Up to-date method is described here: http://stackoverflow.com/a/31016761/683763 – ULazdins Jul 29 '16 at 11:44
5

I myself ran into this problem and found the solution here. For me it worked on target API Level 16. So I will recommend you that you create a new emulator with target API level 16 (Android version 4.1.2, non-google API) and install these files on it. This will make it google-api emulator.I am posting the actual answer for reference

This fix was broken with the latest sdk tools resulting in an error:

"Google Play services out of date. Requires 3159100 but .."
Here are the updated gms and vending files. Same instructions as before: Create a new emulator with any cpu/abi, a non google-api target (versions 10-17 work) and gpu emulation on or off, and then install the files:

adb install com.android.vending-20130716.apk 
adb install com.google.android.gms-20130716.apk 

If you are upgrading an existing emulator then you might need to uninstall previous versions by:

adb uninstall com.android.vending
adb uninstall com.google.android.gms
Community
  • 1
  • 1
Chetna
  • 864
  • 8
  • 26
  • Your solution worked for me. The APKs are good for API level 16. Here is the version information for the APKs. package: name='com.android.vending' versionCode='80210010' versionName='4.1.10' and package: name='com.google.android.gms' versionCode='3159132' versionName='3.1.59 – dbasch Jul 30 '13 at 08:08
  • what about on device? I've got this issue, but it's happening on device, and my device has the latest google play service app installed. As a result, there's no way to get the annoying prompt to go away such that the user can actually use the app. Just posted this as a question here http://stackoverflow.com/questions/18909278/google-play-services-out-of-date-on-device-not-ave-device-has-most-recent-ve – wkhatch Sep 20 '13 at 05:26
2

update your google play services https://play.google.com/store/apps/details?id=com.google.android.gms&hl=en

and try on real device , i also had the same error after updating this error was resolved or you can install the foursquare app which will redirect you to install google play services directly

https://play.google.com/store/apps/details?id=com.joelapenna.foursquared

jai_b
  • 1,113
  • 7
  • 7
2

GooglePlayServicesUtil.isGooglePlayServicesAvailable is deprecated. It's recommended to use the similar method,

GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(contex) from GoogleApiAvailability Class.

osayilgan
  • 5,873
  • 7
  • 47
  • 68
1

Just replace jar-file in ..\libs of Google Play Services library (newest revision) with jar-file from ..\libs of Google Play Services library (older revision).
Do the same thing with jar-file in ..\bin.

It works in my case. I use Android Emulator (API Level 8) from Windows 7.

P.S. I did those things after doing necessary actions in these tutorials:
1) https://blog-emildesign.rhcloud.com/?p=435
2) https://blog-emildesign.rhcloud.com/?p=527

Olexandr
  • 11
  • 2
0

I've have same problems too. The Google Maps Android V2 take me a lot of time. But fortunately, I have found some apk files and wish to share for you.

com.android.vending pakage:
[3.9.16]
[4.3.11]

com.google.android.gms package
[3.1.36]
[3.2.25]
[3.2.65]
link folder for all packages

I have test on the emulator with android api-16(4.1.2), api-17(4.2.2), api-18(4.3). It work well, and the map is shown.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Dat Le
  • 1
0

Please refer to the answer How to check Google Play services version?.

PS:
1. I don't use emulator in my case, but hope it will be any of help.
2. It can help avoid the app from cash because of "NullPointer Error", which is caused by mMap = mapFragment.getMap();, but still, you need to solve how to update google play service in emulator by your self.

Community
  • 1
  • 1
Simon Gong
  • 428
  • 1
  • 4
  • 10
0
int resultCode=GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this);
                switch (resultCode){
                    case 0:
                    proceedAfterPermission();
                    break;
                case 2:                                             
                    Toast.makeText(getApplicationContext(),"Update your Google APIS",Toast.LENGTH_SHORT).show();
Ankit Tomer
  • 127
  • 1
  • 4
-1

I got a very similar error with the latest version of google-play-services - 9.0.0. W/GooglePlayServicesUtil: Google Play services out of date. Requires 9080000 but found 9078574

The wear device refused to update Google Play Services when I went into Settings > About > Versions: Tap to View > Google Play Services (Tap on the version number)

I could fix the error by reducing the version of google-play-services used in the wearable module's build.gradle down a version (to 8).

compile 'com.google.android.gms:play-services-wearable:8.+'

I'm posting in case anyone else has a similar problem with the latest version.

TTransmit
  • 3,270
  • 2
  • 28
  • 43