For the emulator I have below, I am getting the error message that "Google Play Services not installed on the device".
As per the developer site, it says that 'The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.
Not able to understand if the emulator is running 4.4.2 then why is google play services not present?
Some related threads, but no resolution. (adding these just to point out this issue is not a duplicate): Related Thread Related Thread
If you're using Xamarin, I found a guide on their official forum explaining how to do this:
Hereafter, you might also need to update the Google Play Services from the Google Play Store.
Hope this helps for anyone else who has troubles finding the documentation.
google play service is just a library to create application but in order to use application that use google play service library , you need to install google play in your emulator.and for that it need the unique device id. and device id is only on the real device not have on emulator. so for testing it , you need real android device.
Setp 1 : Download the following apk files. 1)com.google.android.gms.apk (https://androidfilehost.com/?fid=95916177934534438) 2)com.android.vending-4.4.22.apk (https://androidfilehost.com/?fid=23203820527945795)
Step 2 : Create a new AVD without the google API's
Step 3 : Run the AVD (Start the emulator)
Step 4 : Install the downloaded apks using adb .
adb come up with android sdks/studio
Step 5 : Create the application in google developer console
Step 6 : Configure the api key in your Androidmanifest.xml and google api version.
Note : In step1 you need to download the apk based on your Android API level(..18,19,21..) and google play services version (5,5.1,6,6.5......)
This will work 100%.
http://developer.android.com/google/play-services/setup.html
Quoting docs
Needs Emulator of Google API"S
See the target in the snap
Snap
I prefer testing on a real device which has google play services installed
You will not able to test the app using the
Google-Play-Service library
in emulator. In order to test that app in emulator you need to install some system framework in your emulator to make it work.https://stackoverflow.com/a/11213598/1405008
Refer the above answer to install Google play service on your emulator.
If you happen to not have the image, download it via the SDK manager: