Fadi Obaji
Fadi Obaji

Reputation: 1494

Android: Google play services not working on the emulator

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.

Upvotes: 3

Views: 9519

Answers (3)

Code on the Rocks
Code on the Rocks

Reputation: 17824

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.

Upvotes: 2

Abhishek
Abhishek

Reputation: 1345

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.

Upvotes: 0

Yash Sampat
Yash Sampat

Reputation: 30611

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.

Upvotes: 3

Related Questions