Reputation: 4567
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?
Upvotes: 4
Views: 13593
Reputation: 1204
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.
Upvotes: 3
Reputation: 408
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.
Upvotes: 0
Reputation: 4567
I had to create an emulator with Google API 21 (and not 22) and it worked... See @selvin remarks
Upvotes: 7
Reputation: 637
Please install "Google APIs ARM EABI v7a System Image" API 22 to access Google Play services on emulator.
Upvotes: 3