17

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 :

enter image description here

I've tried updating everything in SDK manager. Also tried in Eclipse, Help->Check for updates.

10
  • If you are using Maps API v2, emulator won't be able to load maps. You'll have to test it in the device. But if you want to do it in Emulator, there are workarounds available. Maps API v2 requires Google Play Services to run, which aren't there in Emulator.
    – Dhaval
    Oct 14, 2013 at 11:08
  • @Dhaval I know that. But any other screen should be fine.
    – Geek
    Oct 14, 2013 at 11:10
  • Is is running in device or just Emulator problem? So we can narrow down the problem
    – Dhaval
    Oct 14, 2013 at 11:36
  • @Dhaval On device this runs fine. Problem with emulator only.
    – Geek
    Oct 14, 2013 at 11:42
  • Ok. Then it must be the problem with Maps API v2. I searched myself as well, the problem seems to be the same as i said before. This is a very unique problem. Maybe try Launching application with activity other than MapActivity.
    – Dhaval
    Oct 14, 2013 at 11:51

10 Answers 10

11
+25

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.

10

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.

1
  • 2
    I was having exactly same situation. But eventually it worked for me. Thank you. :-) Sep 3, 2015 at 5:15
6

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.+

2
  • it worked with me too (I was trying it on LG G2 Mobile), but why?
    – AbdelHady
    Sep 10, 2014 at 13:13
  • yeah, same here. I was using 5.2.08 and changing to 5.0.+ worked fine. Sep 17, 2014 at 2:57
4

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.

3
  • 1
    Eclipse: After updating with the SDK Manager. Create a new google play library project to replace your existing google play library project.
    – danny117
    Oct 21, 2013 at 13:29
  • Did you create a new google play library project and add to your project properties as library. Also you need to place the google-play-services.jar in project libs folder.
    – arshu
    Oct 22, 2013 at 12:22
  • @ArshadParwez Yes, I created. I already had old .jar in libs. So just importing a new google play library should set .jar.
    – Geek
    Oct 22, 2013 at 13:36
3

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

3
  • Since Genymotion 2.0.0 released in November 2013, they have stopped giving emulator bundled with Google apps. Read more Jan 23, 2014 at 12:31
  • 1
    There is still a way , refer : Adding Google Apps to Genymotion stackoverflow.com/a/20013322/877994
    – Balaji
    Jan 24, 2014 at 9:18
  • Yeah they have stopped giving OFFICIALLY. Otherwise Everything is possible in Software and Programming Industry :) Jan 24, 2014 at 9:28
0

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.

0

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.

0

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).

0

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.

0

(Only for Android Studio Users)

I have faced the same problem and solved it by updating Android Studio and SDK libraries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.