Reputation: 413
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
Upvotes: 17
Views: 51957
Reputation: 1
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.
Upvotes: 0
Reputation: 1805
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
Upvotes: 16
Reputation: 135
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();
Upvotes: 0
Reputation: 3350
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.
Upvotes: -1
Reputation: 5893
GooglePlayServicesUtil.isGooglePlayServicesAvailable
is deprecated. It's recommended to use the similar method,
GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(contex)
from GoogleApiAvailability
Class.
Upvotes: 2
Reputation: 3489
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
Upvotes: 18
Reputation: 458
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.
Upvotes: 0
Reputation: 11
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
Upvotes: 1
Reputation: 1103
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
Upvotes: 2
Reputation: 864
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
Upvotes: 5