Note: the Xamarin Android Player is deprecated, we recommend you install the Google SDK Android emulators and use the Google Play x86 images instead.
Installing Google Play Services in XAP
The Xamarin Android Player is a great way to test your Android applications quickly and easily. One thing that is not included directly is support for Google Play Services. This means that several APIs, including support for maps, are not supported by the emulator.
Fortunately, adding this closed-source component is quick to install on both the Windows and macOS versions of the emulator. It is assumed you already have the emulator installed and have download one or more of the supported images.
- Start the Xamarin Android Player and run one of the supplied images, the following assumes you have started the KitKat Nexus 4 image.
- Download the proper Google Play Services .zip file from www.teamandroid.com/gapps/ . Make sure to download the image appropriate for your version of Android.
Drag the .zip file onto the running emulator and drop it to install the component, here we show it on macOS, but the same mechanism is used in Windows.
You will get a prompt to install the package onto the emulator which indicates the image will be restarted
Once it restarts, you will get a notification that installation is completed, and the image will now have Google Maps, Google+ and support for the Google Play store.
Note that some things do not work correctly and you may get a few errors from some of the services, but you can safely dismiss these and continue the instructions.
Next, you will need to associate a Google account so that you can update the services using the Google Play store. It should prompt you for this, but if it does not, you can go into the Google Settings and add a new account.
Once you've added the account, you can then update the Google apps by opening the Google Play store application and going into settings from the side bar menu:
Select Settings and then scroll down to the Build Version number information and double-tap on it until it tells you it is either up-to-date, or that it will download and install a new version.
Power off the device (press and hold the power button in the toolbar on the right) and restart it. Once it restarts, it should indicate that it needs to update the Google Play services, tapping the notification will open the Google Play Store and install the latest version
Now you can run applications that depend on Google Maps in the Xamarin Android Player.