Introduction:
In this article, we will talk about how to install Google apps on visual studio android emulator. We need to install Google Apps on emulator, if we need to test the applications which access Google services like Google Maps. So let`s get started.
Requirement:
Download the proper Google Play Services .zip file. It should match the version of android installed on emulator.
Steps:
- Start the visual studio android emulator (I have started my visual studio android emulator which has Lollipop version API 21). Image is as shown below (F: 1),
- Click on Additional Tools icon on the emulator as shown below (F: 2).
- Select the SD Card tab as shown below (F: 3),
- Create a new folder on any drive and browse that folder to create a virtual SD card (F: 4). (I have created a new folder called SDCardAPI21 and selected that folder to create the virtual SD Card).
- Now click on “Pull from Sdcard” button. After some processing, it will create a directory structure in our selected folder as shown below (F: 5).
- Now copy Google Play Services .zip file in Download folder. Location for Download folder is SDCardAPI21\0\Download where SDCardAPI21 is the folder which we have created in Step 4.
- Now let`s go back to our SD Card tab and click on “Push to SD Card” button as shown below (F:6). It will take a few moments for processing. It will copy our Google Play Services .zip file to emulator.
- Go to the location where Android SDK is installed. Then go to the platform-tools folder. Now to open the command prompt at this location, hold the SHIFT key and Right click using mouse in that folder. We will get a new option in Right click menu Open command window here as shown below (F: 7). Select that option; it will open up the command prompt at AndroidSDK\platform-tools location.
- Run the following command to display the list of running devices/emulators. adb devices. ADB (Android Debug Bridge) is a command line tool which helps us to communicate with running emulator instance or connected android device.
After executing the above command, we should get the information about our running android emulator as shown below (F: 8)
- Run the following command to start a remote UNIX shell to our emulator.
adb shell.
- Run the following command to check that our Google Play Services .zip file is copied to emulator.
ls /sdcard/Download
Output of the above command is as shown below (F: 9)
As we can see in above image, our Google Play Services .zip file is copied to emulator.
- Now run the following command to install the Google Apps on emulator. Install_zip.sh /sdcard/Download/gapps-lp-20141109-signed.zip.
- Once the installation is complete, we need to restart the emulator.
- After restart, we should be able to see Google Apps on our emulator as shown below (F: 10),
Conclusion:
In this article, we talked about how to install Google apps on visual studio android emulator. I hope you enjoyed reading the article.
Reference: Stack Overflow