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.

Geek
  • 8,280
  • 17
  • 73
  • 137
  • 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 '13 at 11:08
  • @Dhaval I know that. But any other screen should be fine. – Geek Oct 14 '13 at 11:10
  • Is is running in device or just Emulator problem? So we can narrow down the problem – Dhaval Oct 14 '13 at 11:36
  • @Dhaval On device this runs fine. Problem with emulator only. – Geek Oct 14 '13 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 '13 at 11:51
  • @Dhaval I am not launching mapActivity. This is another activity only. And I it was working fine till now even though I have integrated google maps a long time ago. – Geek Oct 14 '13 at 11:55
  • Ok. I'll get back if i can find something. But do let us know, if you solve it before. It will help all of us. – Dhaval Oct 14 '13 at 12:43
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/39196/discussion-between-akash-and-dhaval) – Geek Oct 14 '13 at 15:50
  • Hi All, I am facing this issue in devices where maps were designed based upon API v2 my mobile version is Android 4.4.3 (Kit kat). Thanks in advance – Aditya Hari Kishan Sep 25 '14 at 11:54
  • This question has been answered [here](http://stackoverflow.com/a/40084060/6482813) – Kuti Gbolahan Oct 17 '16 at 10:35

10 Answers10

11

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.

Illegal Argument
  • 10,090
  • 2
  • 44
  • 61
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.

Ojonugwa Jude Ochalifu
  • 26,627
  • 26
  • 120
  • 132
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.+

Lucas Zamboulis
  • 2,494
  • 5
  • 24
  • 27
devcfgc
  • 89
  • 1
  • 4
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.

arshu
  • 11,805
  • 3
  • 23
  • 21
  • 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 '13 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 '13 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 '13 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

Community
  • 1
  • 1
Balaji
  • 1,619
  • 15
  • 19
  • Since Genymotion 2.0.0 released in November 2013, they have stopped giving emulator bundled with Google apps. [Read more](http://www.technotalkative.com/lazy-productive-android-developer-2/) – Paresh Mayani Jan 23 '14 at 12:31
  • 1
    There is still a way , refer : Adding Google Apps to Genymotion http://stackoverflow.com/a/20013322/877994 – Balaji Jan 24 '14 at 09:18
  • Yeah they have stopped giving OFFICIALLY. Otherwise Everything is possible in Software and Programming Industry :) – Paresh Mayani Jan 24 '14 at 09: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.

Aaron
  • 1
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.

Community
  • 1
  • 1
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).

rogue
  • 941
  • 6
  • 3
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.

Marc Davies
  • 205
  • 3
  • 13
0

(Only for Android Studio Users)

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

george mano
  • 5,948
  • 6
  • 33
  • 43