4

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"

enter image description here

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?

tomsoft
  • 4,448
  • 5
  • 28
  • 35
  • http://stackoverflow.com/questions/29429727/android-google-play-services-not-working-on-the-emulator/29430240#29430240 – Abhishek May 11 '15 at 10:42
  • -> it is not supposed what happens when you create a device using adv with the binary including google API? If not, how do you know which apk to install (here it's 7.0.0 while in my case it's 7.3.0) – tomsoft May 11 '15 at 10:47
  • @AbhishekDabral I've tried to manually install the latest apk, no change – tomsoft May 11 '15 at 11:09
  • try with genymotion https://www.genymotion.com/#!/ – Abhishek May 11 '15 at 11:12
  • 2
    Google API version 22 emulator has fU Google Play's updater(i don't have link to bug now but i'm sure that i found it few days ago) .... use Google API version 21 – Selvin May 11 '15 at 11:45

4 Answers4

7

I had to create an emulator with Google API 21 (and not 22) and it worked... See @selvin remarks

tomsoft
  • 4,448
  • 5
  • 28
  • 35
3

Please install "Google APIs ARM EABI v7a System Image" API 22 to access Google Play services on emulator.

Sameer Khan
  • 637
  • 6
  • 15
3

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.

Fenil
  • 1,194
  • 10
  • 11
0

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! Delete Google Play Services, and then re-install it

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.

MethodMan
  • 409
  • 5
  • 8