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
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
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
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
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
GooglePlayServicesUtil.isGooglePlayServicesAvailable is deprecated. It's recommended to use the similar method,
GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(contex) from GoogleApiAvailability Class.
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
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.
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();
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.
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.
Related
I've tried to install Google Play on the emulator. I've followed the instruction from Google Dev Site.
Using ADV manager it seems ok, devices are targeting Google API version 22, but when I run my image I always have an "This app won't run unless you update Google Play services"
My test program works fine on a real device
The dependencies includes this:
dependencies {
compile 'com.google.android.gms:play-services:7.3.0'
}
I've tried to manually add the Google Play apk:
> adb install -r com.google.android.gms-7.3.29_\(1866531-038\)-7329038-minAPI9.apk
4503 KB/s (37113767 bytes in 8.048s)
pkg: /data/local/tmp/com.google.android.gms-7.3.29_(1866531-038)-7329038-minAPI9.apk
So is there a way to check emulator is running with Google Play services? If no, how to solve the problem?
I had to create an emulator with Google API 21 (and not 22) and it worked... See #selvin remarks
Please install "Google APIs ARM EABI v7a System Image" API 22 to access Google Play services on emulator.
I faced the similar issue, so i changed google play services version in my build.gradle file from 8.1.0 to 7.8.0. I think the Problem is because your application is using higher version of google play services then the version which is installed on emulator. Above is the work around, don't know the solution yet.
I had the same issue. I deleted the google play services in the SDK manager (see pic). And then re-installed it. Then try restarting the SAME emulator and hopefully the app works!
This is a very annoying issue. It can also be solved with downgrading your build.gradle file as mentioned by Fenil, where the x.x.x have changed by now.
I am getting "Update Google Play Services" alert when running project on emulator. If I click OK then there is one more alert behind it. I keep clicking OK and there are tons of alerts already popped up and I end up giving up.
Message looks as below :
I've tried updating everything in SDK manager. Also tried in Eclipse, Help->Check for updates.
Updated: Jun 27 2019:
The new google x86 emulator with play services is exactly like a device where you can install apps from play store and all other things.
Previous Answer:
I faced similar problem while trying google maps in emulator. While some people have been able to run google play services in their emulator by downloading google play services application from their mobile, making the apk file and then installing that file in emulator, it is really complicated process and works for certain api level only. Same is the case with emulator using google api's that shift with builtin maps and google play services. The maps application will work in emulator while your application asks for update to google play services. So the wise thing to do is to test it in real hardware.
For me, I had to go to settings | apps on my emulator and then find Google Play Services, I then saw that the version number was no where near the current version number (6.7.74 as against the current 7.3.0)
I then went to my dependencies and changed:
compile 'com.google.android.gms:play-services:7.3.0'
to
compile 'com.google.android.gms:play-services:6.+'
You'll get warnings saying a newer version is available and to avoid using + in version numbers but if you've spent the entire day looking for a solution like I did, you could care less.
In android studio changing the depencies work for me:
com.google.android.gms:play-services:5.+
to:
com.google.android.gms:play-services:5.0.+
Now you can also use your emulator to run Android MAP API V2.
Note: Only Android 4.2.2 and higher versions of the Google APIs platform include Google Play services.
The problem here is that you have an older version of Google Play Services. Update to the latest version by opening the SDK Manager => Extras => Google Play Services.
you can try using new Genymotion Android emulator in which you can update google play services. I have faced this alert and able to update it.
It seems like we can't test latest Google maps API, which is dependant on google play store app which is missing in Google's Android Emulator.
Genymotion Android Emulator comes with Google Play store app.
NOTE: Genymotion v2.0 discontinued packaging virtual machine with google apps , but refer this link to add Google Apps Manually to Genymotion
I had the same issue.
It's nice that in the newer emulators (for version 17 and up) come with the play services included, but what about older versions?
eventually i found the emulators provided by testobject. all their emulators (starting at version 15) come with the updated play services and google APIs (maps v2 etc'), for both ARM and x86.
Check this answer https://stackoverflow.com/a/19734573/3284964. It helped me. For me it works on 4.3 emulator (google play services release 3.2.65) and google play services for froyo lib in my app.
I had a problem with Android Studio when it imported my Eclipse project.
Look for Google Play Services in your build.gradle.
dependencies {
compile 'com.google.android.gms:play-services:+'
}
Change this to use an exact version:
dependencies {
compile 'com.google.android.gms:play-services:5.0+'
}
Then clean build (Build -> Clean Project).
Just did some checking and I realise this question is quite old but, it seems API19 Google Apis Disk Image works with Google Play Services just tested it with an application im working on and it shows the Goolge Maps V2 just fine.
(Only for Android Studio Users)
I have faced the same problem and solved it by updating Android Studio and SDK libraries.
I am trying to integrate Google Plus Login in my android application. When I tried running this application on android Google API emulator, I get a dialog box prompting me to update the 'Google Play Services'. On clicking 'Update' button nothing happens and I can see following error in logcat:
Can't redirect to app settings for Google Play services
I am also getting following warning in the logcat:
Google Play services out of date. Requires 3225100 but found 3158130
Also I would like to add that I had updated Google Play Services from revision 8 to revision 10.
Can anyone please tell me how to update Google Play Services on an emulator?
I know there are many questions on this topic on Stack Overflow but nothing seems to work for me. Any help would be greatly appreciated.
I'm also facing the same problem...
I had it working about 2 weeks ago (had to format, and now i am quite upset), following Chetna answer in here:
Google Play services out of date. Requires 3159100 but found 3158130
I tried to downgrade Google play services, replacing rev. 10 for 9 (rev. 9 was the version i had installed the time i got it to work - found it here: http://venomvendor.blogspot.co.il/2012/03/android-sdk-extras-by-google-inc.html), but, still no answers how to make it work! Don't understand why this question was down rated...
EDIT: So, after trying for almost a day to do this, i solved my problem (and maybe yours). There are a couple of steps to take care of this:
1) Follow Chetna answer in here (2nd answer):
Google Play services out of date. Requires 3159100 but found 3158130 (2nd answers), the gms and vending files are the most up to date that i know of.
If you don't understand what to do in step 1 =>
1.1) Go to the link above and download com.android.vending-20130716.apk and com.google.android.gms-20130716.apk.
1.2) Go to android\sdk\platform-tools and place those two files in the folder
1.3) Create AVD with android 4.2.2 (or version below) without google api and start it, then wait for it to load, till there is nothing more to load...
1.4) I only have windows so i only use this method: open command window (cmd) in that folder and do:
adb install com.android.vending-20130716.apk
and
adb install com.google.android.gms-20130716.apk
Both of these commands will take some time, and reply with a success or failure message (both replys must be success).
1.5) Turn off the AVD.
2) Just for the sake of it, downgrade your google play services to rev 9 (to do this uninstall from sdk or delete android\sdk\extras\google\google_play_services folder http://www.mediafire.com/download/bqs2kmza5vn8e04/google_play_services_9.7z - link from the venomvendor.blogspot)
3) Import android\sdk\extras\google\google_play_services\libproject\google-play-services_lib and copy it to your workspace, add it to your project through properties > add (in the library "menu")
4) Go to project > clean > clean all projects (this one did the trick for me)
It worked for me, hope it works for you too!
Cheers
I'm trying to make an application using google maps, but in the emulator it does not work in console I see the following error:
W/GooglePlayServicesUtil(1041): Google Play services out of date. Requires 3159100 but found 3136130
On screen I see that I have to update google services ..
My virtual machine is 4.2.2
What do I do? I've searched the forums here .. but no solution that I've tried has worked ..
Install a compatible version of the Google APIs platform. Open the sdk manager and check if you have the updated Google play services.(assuming you use eclipse)
Quoting from the docs.
If you want to test your app on the emulator, expand the directory for Android 4.2.2 (API 17) or a higher version, select Google APIs, and install it. Then create a new AVD with Google APIs as the platform target.
Note: Only Android 4.2.2 and higher versions of the Google APIs platform include Google Play services.
http://developer.android.com/google/play-services/setup.html
Check the topic under Ensure Devices Have the Google Play services APK.
Make sure you have the latest updates
This is a Google issue. Check this out - https://code.google.com/p/android/issues/detail?id=57880
They've posted a message saying that they will post the updated play services soon. Till then (as of 31 July) you won't be able to run the Google Maps API on your emulator even if you do all the steps required.
Edit: As of September 2013, they've launched an update for it..
In your SDK manager, make sure you've downloaded the latest 'Google play services' or alternatively download them manually and adb install onto the emulator.
I resolved this issue by creating a new avd with target version as : Google APIs(GoogleInc) API Level 18. (platform 4.3 google api required)
the image of SDK
i want to downgrade the version of my google play services from rev version 6 to rev version 5.
i need this to run maps on emulator but i cant figure out on how to do it.
[i have found a kind of solution here][2]
[2]: The latest com.google.android.gms for google play services revision 6 but i can't figure out how to actually downgrade it.
on this version i am getting an error
Google Play services out of date. Requires 3027100 but found 2012110
if anybody know on how to do it then please share or if anyone can provide the new apk files to be installed on the device to get it to work with the maps.
You can download an older revision from here:
http://venomvendor.blogspot.co.il/2012/03/android-sdk-extras-by-google-inc.html
Then remove the newer version from workspace, and add the desired one.
Once you did that you can refrence it with your project and check again.
You can read this blog post I wrote on this matter as well:
Google Maps API V2 in Emulator