Visual Studio Emulator for Android - Install Gapps

2019-01-16 03:09发布

I'm using the new VS Android Emulator with Android Studio:

https://www.visualstudio.com/en-us/features/msft-android-emulator-vs.aspx

It doesn't have Google Play Services installed... so I'm following this guide to install:

https://university.xamarin.com/resources/how-to-install-google-play-on-android-emulator

I've downloaded the proper Gapps file (in my case):

http://www.devfiles.co/download/7m2VdVjQ/gapps-kk-20140105-signed.zip

Now I've dragged and dropped the ZIP file onto the emulator... and it's just stalled at "copying file"... Is there anything else I need to be doing here in order to get Gapps installed? How long does this "install" usually take?

enter image description here

11条回答
Bombasti
2楼-- · 2019-01-16 03:31

Following the instructions above, I could NOT get Google Play Store to launch successfully on my Marshmallow 6.0.0 Tablet API-23 VM in VS Emulator for Android.

I've tried all the troubleshooting methods mentioned above to no avail.

What finally worked for me was installing (dragging & dropping) the PREVIOUS version of GAPPS (gapps-lp-20150314.zip) for Android 5.1 Lollipop API-22 in my Marshmallow 6.0.0 VM.

Worked like a charm!

http://www.teamandroid.com/gapps/

http://www.devfiles.co/download/fAgtiEoX/gapps-lp-20150314.zip

查看更多
一纸荒年 Trace。
3楼-- · 2019-01-16 03:32

Found a solution on the web that works. The article suggests it only works for Android 5.1, I haven't tried Marshmallow.

http://www.rajapet.com/2016/03/adding-google-play-services-to-visual-studio-android-emulator.html

  1. Start "Visual studio emulator for android" from the start menu

  2. Create a new emulator for Lollipop, 5.1.1 (API Level 22), start it up

  3. As VS emu runs under x86, we need the "ARM Translator", found on this page:

http://www.techbae.com/download-install-arm-translation-v1-1-zip-genymotion/ ([TechBae.com]Genymotion-ARM-Translation_v1.1.zip)

Drag the file to the emulator window, close and restart the emulator if it doesn't automatically.

  1. Install gapps from http://www.teamandroid.com/gapps/, eg gapps-lp-20150314.zip

Just download, drag to emulator, restart

  1. Wait for app optimization to finish

  2. Open Play Store, ignore any errors. If play store hangs, kill it and start again

  3. Sign in

  4. Expand the side menu

  5. Go to settings

  6. Scroll down to Build version, click/tap. You should get a message that a new version of the play store will be installed

  7. Wait for the XDE.exe process to stop downloading

  8. Restart the emulator

  9. Go back to play store, side menu, click Build version - Ensure it is up to date. If not, let it download

  10. Install an app that uses play services, eg Maps to verify

查看更多
兄弟一词,经得起流年.
4楼-- · 2019-01-16 03:32

I tried all the previous answers, including the accepted one about running the install_zip.sh shell script, but nothing worked right for me for VS emulators of Android Lollipop (5.1) and Marshmallow (6). The problem seems to be also that Gapps has now some native code, processor specific, and most Gapps packets available for download are compiled for ARM processors. I tried OpenGapps which does have processor specific packages, but their complex installation scripts didn't work for me in VS emulators.

I finally found a Gapps package prepared for ASUS Zenphone 2, which does have an Intel processor - specifically I downloaded the package recommended here, and that installed fine with just drag and drop on Visual Studio emulator for Android 5.1

查看更多
萌系小妹纸
5楼-- · 2019-01-16 03:37

It looks like you're doing the right thing to get the Google Apps installed, but just in case, these instructions might help: http://codesmells.net/2015/07/27/installing-the-google-play-store-in-the-microsoft-visual-studio-android-emulator/

查看更多
疯言疯语
6楼-- · 2019-01-16 03:39

Now you can just drag&drop proper Gapps file to working Emulator and then you should see something like this:

enter image description here

查看更多
祖国的老花朵
7楼-- · 2019-01-16 03:42

Tomasz Cielecki pointed out a solution that involves installing gapps twice.

First install the gapps downloaded from here, reboot the system and then install gapps again with a version downloadable from here.

At least this worked well for me.

查看更多
登录 后发表回答