Android: Google play services not working on the emulator
Asked Answered
H

3

3

I had to format my Windows laptop so I copied the SDK folder (because it's about 30 GB large) and i pasted it in the same place on the new Windows copy.

Now when I start Android Studio and SDK Manager everything looks fine and all tools & packages appear as downloaded, but when I start an emulator to test my app, it says Get Google Play Services which I already have in my gradle as follows:

compile 'com.google.android.gms:play-services:7.0.0'

It was working fine on the old Windows machine but now it refuses to detect Google Play Services.

Also the emulator is very slow, it used to be very fast on the old Windows machine.

What am i missing here ?

Thanks in advance.

Herc answered 3/4, 2015 at 9:40 Comment(3)
Change "Project Build Traget" to Google API by default it is to the api level you have upgraded to.Jacobian
You have included Play services library with your app. Now if you look on your physical phone app list, you'll find its Google Play services app counterpart, which is missing from your emulator. What you include with your app is just means to connect to the Play services app.Lentissimo
This answer solved it for me: #35476682Telemechanics
F
3

The Google Play Services app is missing on the emulator. The library is required only to compile projects against the Google Play Services APIs'.

As per the reference documentation at Setting Up Google Play Services:

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.

So what you need to do is use the Google APIs as the target SDK setting.

Fecteau answered 3/4, 2015 at 9:56 Comment(2)
Yes i'm using a Lollipop Emulator (5.0), it should come with Google API in it, but it always says Get Google Play ServicesHerc
I think i should delete and re-download them, i'll try thatHerc
P
2

My issue was related to the system image I selected during device creation. The default option was the UpsideDownCakePrivacySandbox. This would simply crash anytime I tried opening it or I'd get the "Google Play Services has stopped" message.

enter image description here

I fixed it by using the regular UpsideDownCake system image.

Pandiculation answered 3/2, 2024 at 14:49 Comment(1)
That's what it was for me too.Hukill
U
0

Download Google Play Services 7.0 and install it in your emulator either via adb shell or simply by dragging and dropping.

I recommend GenyMotion emulators as they are comparatively fast and easy to access.

Unblock answered 3/4, 2015 at 10:17 Comment(1)
Drag and drop into an Android emulator (not Genymotion)? Never seen that.Pacification

© 2022 - 2025 — McMap. All rights reserved.