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?
I was trying it out yesterday myself and had the same problem. Apparently, non of the drag and drop functionality worked. So this, is what I did to resolve the issue:
Use the Additional Tools (small >> icon) for the emulator and go to the SD Card tab.
Select a folder on your computer to sync with the virtual SD card.
Pull from SD card, which will create a folder structure on the selected folder.
Now copy the Gapps fill to the 'Download' folder.
Push to SD card. This will take a little while, and copy the zip file to your emulator.
Run a commmand prompt, and go to sdk\platform-tools in your Android SDK location and run adb devices.
If you see the your emulator in the list, then skip to step 9.
If you do not see emulator, run the following:
adb connect <emulator ip>:5555
You can find the emulator ip, from within the emulator, go to Settings -> About Phone -> Status and IP section.
Next run, adb shell. This will give you a prompt to the android emulator.
Confirm the gapps file is there: ls /sdcard/Download
Now run, install_zip.sh /sdcard/Download/<flashablezip>.zip
This should begin the flashing process.
Hope this helps in resolving the issue.
Now you can just drag&drop proper Gapps file to working Emulator and then you should see something like this:
Drag and drop doesn't work if you start the emulator from Visual Studio when you are running Visual Studio as an administrator. To be able to drag and drop run the emulator from the start menu (not as administrator) not from Visual Studio.
It seems that the emulator hangs trying to install files if it cannot find adb.exe.
Ensure you have the Android SDK installed
If you run regedit.exe and look at the HKEY_LOCAL_MACHINE\Software\Wow6432Node\Android SDK Tools reg key, there is a Path string value that points to a location on disk. Double check to make sure that there is a copy of adb.exe located in the platform-tools directory under that path.
Hope this helps.
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
Start "Visual studio emulator for android" from the start menu
Create a new emulator for Lollipop, 5.1.1 (API Level 22), start it up
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.
Install gapps from http://www.teamandroid.com/gapps/, eg gapps-lp-20150314.zip
Just download, drag to emulator, restart
Wait for app optimization to finish
Open Play Store, ignore any errors. If play store hangs, kill it and start again
Sign in
Expand the side menu
Go to settings
Scroll down to Build version, click/tap. You should get a message that a new version of the play store will be installed
Wait for the XDE.exe process to stop downloading
Restart the emulator
Go back to play store, side menu, click Build version - Ensure it is up to date. If not, let it download
Install an app that uses play services, eg Maps to verify
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
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
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.
You could just use an Android Emulator image (AVD), similar to a VM image, one that has a Google Play services installed. That would be easier than trying to install it in the emulator. Usually, you can see this Android Studio under Tools > Android > AVD Manager and create a Virtual Device and select from the images which has Google Play Services already.
Now Docker + Hyper-V + Android Emulator is possible without needing VS Android Emulator (in fact they seem to be a discontinued job).
Now the Google's emulators work well even with Hyper-V activated.
More info here about how to make it work here (spoiler: it is a simple tick in a checkbox) https://android-developers.googleblog.com/2018/07/android-emulator-amd-processor-hyper-v.html
Related
I haven't been on Android Studios in a number of days. When I went back on my emulator kept getting killed. I deleted all my emulators and the AVD manager folder in .android. After selecting that the emulator graphics be Software GLES 2.0 the emulator works and can run the application but it is very, very slow. Only a week ago the emualtor and Android Studios worked great.
I am receiving this error messaging now after re-installing an emulator with API level 28 (Pie):
Answer that work [28. July 2021]
First of all update your graphic card with the latest driver. (Graphic Card Model can be checked through your Device Manager)
Type in your explorer the following path, where <pc_name> need to be replaced with your individual name:
C:\Users<pc_name>.android
In the above mentioned directory we will put a .ini file that I prepared and is ready to download here. This file will disable your Vulkan driver and enable your GLDirect driver that your AVDs don't lag anymore. (watch image below)
Start your AVD and you will be able to use it without any troubles.
There is a missing or corrupted file amdvlk64.dll.I fixed this by given steps.
Download amdvlk64.dll from This Link , this is for 64 bit OS, you can search fro 32 bit also.
After Download, extract the folder on your desktop.
Open Extracted folder and Copy the amdvlk64.dll file.
Now Paste this file in C:\Windows\System32
Again run the emulator, hopefully it will run.
In my case I resolved this by performing the pending SDK Tools updates in the SDK Manager.
Reference : https://superuser.com/a/1583394/961460
I get this error (Emulator is closed because of internal error: gpu found)
suddenly while I am running my code. So how I solve the problem is,
Go to AVD Manager or (Virtual Device Manager).
Edit your AVD or (Virtual Device Manager).
Select 'Software GLES2.0' option on Emulated Performance.
Click Finish.
Start AVD again
Download and install this vulkan-dll driver.
There are those who think that the comment I added is a virus, I researched the subject a lot and finally reached the address, almost 48 hours later, so I installed my emulator, my aim is just to help.
For me, the same error showed even though I have NVIDIA GPU.
Restarting the system after the NVIDIA driver update fixed the problem.
I installed Android studio in Windows 10(AMD Ryzen), the following one helped me to run the emulator smoothly. Once you installed Virtual device from AVD manager successfully, then your emulator will popup the above error like Android emulator closed....amdvlk64.dll not found and amdvlk32.dll not found.... when you try to run your code. Just follow this steps to avoid those error, hope it works:
Close your Android studio and also emulator error popup. Go to
Control Panel.
Select Programs --> Programs and Features --> Turn windows feature
on or off (which lies in the extreme right side of the screen).
A popup appears, in that check the Windows Hypervisor Platform and
Virtual Machine Platform, then click Ok.
It ask you to restart your system, allow to restart.
After restart, now open Android studio and run your emulator, hope it will
run smoothly.
At times the error might be caused by the wrong system date/time set on your computer. Try updating the system date/time and restart the android emulator. In my case it was caused by the wrong system date/time.
I understand this question has been asked a few times, however the solutions for the other users have not resolved my issue. I am attempting to install ARCore on my Android Studio emulator. The Play Store says "Your device isn't compatible with this version," and when I click and drag the ARCore for emulator APK to manually install it on the emulator, it gives me the following message: "The APK failed to install. Error: Could not parse error string"
The System Image I'm using: Oreo/ API Version 27/ABI x86/Android 8.1 (Google Play)
I have set the OpenGL ES API level to Render Maximum, and its version is showing up as OpenGL ES 3.1.
I have tried every solution I could find on here and have had no luck. Has anyone else had this issue or can you offer any suggestions?
If your smartphone doesn't support ARCore or you have no phone but need to debug an AR app – Android emulator is a great way to do it.
Follow these steps to install Android Virtual Device (AVD):
Make sure Android Debug Bridge (adb) is installed and works properly.
Download the latest ARCore_emulator.apk from GitHub.
Choose AVD using menu Tools > AVD Manager and run it.
Type this command in Terminal while the virtual device is running:
adb install -r ARCore_1.8.0.x86_for_emulator.apk
Repeat previous steps for additional AVDs you’d like to use on port 5554.
If you need more detailed information, please read THIS POST.
Followed Andy's Answer as follows:
Make sure adb is installed by typing adb at any terminal. *
1) Downloaded Google_Play_Services_for_AR_1.14_x86_for_emulator.apk from Android SDK Google Services (download it from latest release)
2) Copied this ***_x86_for_emulator.apk to the project root folder
3) Create new or Edit/Update existing Emulator with the instructions on the docs: How to create an Emulator with ARCore Support
i.e you must have emulators settings done.
4) Run the emulator
5) Open the terminal at Project Root (or anywhere you copied the ***_x86_for_emulator.apk file) and execute:
adb install -r Google_Play_Services_for_AR_1.14_x86_for_emulator.apk or
adb install -r <name_x86_for_emulator>.apk
5) Now run the project on same emulator. You can update rest of the emulators with these steps, providing that they have settings as given in Step 3.
I have launched my emulator via the AVD manager and once it's running I have clicked on run app. I have waited a couple of minutes for my running device to show up in choose a running device but the window always stays blank.
Probably the project you are running is not compatible (API version/Hardware requirements) with the emulator settings. Check in your build.gradle file if the targetSDK and minimumSdk version is lower or equal to the sdk version of your Emulator.
You should also uncheck Tools > Android > Enable ADB Integration
If your case is different then restart your Android Studio and run the emulator again.
This thread helped me to solve my problem, in particular this answer:
In Android Studio go to Menu -> Tools
Android
Uncheck Enable ADB Integration
Had similar issue with my emulator.
Solved by Wiping Data of emulator
Tool > ABD Manager > Down arrow under Action Wipe Data
Note : This is remove all data inside emulator.
For anyone else having the issue - none of the answers provided worked for me.
My case may be different to others but I had Android Studio installed first which installs the SDK by default to: C:\Users\[user]\AppData\Local\Android\sdk. We then decided to use Xamarin for our projects, so Xamarin was installed and installed an additional SDK by default, located here: C:\Program Files (x86)\Android\android-sdk.
Changing Xamarin to match the same SDK path worked for me which I did in the registry (although through the VS settings I'd guess it's the same):
\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools\Path
Change the path to match the Android Studio SDK path, close everything, start the VS Emulator, run Android Studio, ensure ADB integration is off and try. It worked for me.
If you uncheck the ADB Integration, you cannot use the debug any more.You may just restart the adb server, run
$adb kill-server
$adb start-server
in Terminal to restart the adb server without restarting the Android Studio. Then the emulator shows up.
My emulator used to suddenly disappear but the app still continues to run.
Solution-
Open task manager and kill qemu-system (Under Android Studio). This will stop the emulator. Then restart emulator.
Your adb connection is broken.
close eclipse
open cmd-prompt type adb kill-server then adb start-server
reopen eclipse
run the project!
Wipe the data of your Android virtual Device and then start the emulator. Works for me.
I had the same issue on a brand new computer, and the reason was simple. Although I downloaded and unzipped the Android SDK, I didn't add it to the PATH. So:
On Windows, you have to launch envvar and there, add the path to your android/platform-tools
On MacOS, edit the .zshrc file in your home, and add
export PATH="$PATH:/your/own/path/to/android/platform-tools"
This answer is not proposing a solution. Just a workaround in case someone is looking
I am using Idea based Android Studio (some people are talking about eclipse one here)
When I launch the app in the emulator (using the Run App button of Android Studio) AVD shows up but the app does not launch or run.
However when I connect my mobile and launch the app on my mobile the App works (this itself took some time, enabling developer options on mobile and doing the right configuration)
Because My app is launching on connected mobile, I can say nothing wrong with App.
There is some problem with AVD integration which I could not figure out so As of now I am working around my problem following way.
1 - I installed the app manually by dragging the APK file on AVD. (APK file is app\build\outputs\apk\debug folder)
2 - Then my AVD was not showing the installed APP list.
3 - I searched my APP using Google bar on AVD and dragged the APP icon on the home screen of AVD.
4 - I can now launch the APP using my APP icon on the home screen of AVD.
**That's how I am working around my problem. **
I have verified that Run App Icon does install the Application. Installation, not launching, appears to be the problem for me.
try to open the emulator and run it parallel with android studio/eclipse and the option will be displayed to select in the choose the device(emuator name, mine is Genymotion).
Check the android path of the emulator.
I had to change the registry in here:
HKEY_LOCAL_MACHINE > SOFTWARE > WOW6432Node > Android SDK Tools
to the actual path of the sdk location (which can be found in android studio: settings-> System Settings -> Android SDK)
All the credit goes to the author of this blogpost www.clearlyagileinc.com/
start device from genymotion button (have to install genymotion before and setup genymotion folder location on settings)
run application
choose genymotion running device
in your device you want to run app on
Go to settings
About device >> Build number triple clicks or more
and back to settings you will found "Developer options" appear
go to and click on "USB debugging"
Done
This question already has answers here:
How to install Google Play Services in a Genymotion VM (with no drag and drop support)?
(17 answers)
Closed 5 years ago.
I'm currently trying out Genymotion and boy, it's so much faster than the ADT emulator.
But I need to install Google Play to download some apps into it. How do I do this?
Update May 28th, 2017: This method is no longer supported by me and doesn't work anymore as far as I know. Don't try it.
# How To Add Google Apps and ARM Support to Genymotion v2.0+ #
Original Source: [GUIDE] Genymotion | Installing ARM Translation and GApps - XDA-Developers
Note(Feb 2nd): Contrary to previous reports, it's been discovered that Android 4.4 does in fact work with ARM translation, although it is buggy. Follow the steps the same as before, just make sure you download the 4.4 GApps.
UPDATE-v1.1: I've gotten more up-to-date builds of libhoudini and have updated the ZIP file. This fixes a lot of app crashes and hangs. Just flash the new one, and it should work.
This guide is for getting back both ARM translation/support (this is what causes the "INSTALL_FAILED_CPU_ABI_INCOMPATIBLE" errors) and Google Play apps in your Genymotion VM.
Download the following ZIPs:
ARM Translation Installer v1.1 (Mirrors)
If you have issues flashing ARM translation, try re-downloading from a mirror
Download the correct GApps for your Android version:
If you have issues flashing GApps, try re-downloading from a mirror
Google Apps for Android 6.0
Google Apps for Android 5.1
Google Apps for Android 5.0
Google Apps for Android 4.4 (Download from CM11 Links) (4.4 GApps might have bugs)
Google Apps for Android 4.3 (Mirrors)
Google Apps for Android 4.2
Google Apps for Android 4.1
Next open your Genymotion VM and go to the home screen
Now drag&drop the Genymotion-ARM-Translation_v1.1.zip onto the Genymotion VM window.
It should say "File transfer in progress". Once it asks you to flash it, click 'OK'.
Now reboot your VM using ADB (adb reboot) or an app like ROM Toolbox. If nescessary you can simply close the VM window, but I don't recommend it.
Once you're on the home screen again drag&drop the gapps-*-signed.zip (the name varies) onto your VM, and click 'OK' when asked.
Once it finishes, again reboot your VM and open the Google Play Store.
Sign in using your Google account
Once in the Store go to the 'My Apps' menu and let everything update (it fixes a lot of issues). Also try updating Google Play Services directly.
Now try searching for 'Netflix' and 'Google Drive'
If both apps show up in the results and you're able to Download/Install them, then congratulations: you now have ARM support and Google Play fully set up!
I've tested this on Genymotion v2.0.1-v2.1 using Android 4.3 and 4.4 images. Feel free to skip the GApps steps if you only want the ARM support. It'll work perfectly fine by itself.
Old Zips: v1.0. Don't download these as they will not solve your issues. It is left for archival and experimental purposes.
Install Genymotion 2.10 or above, now there is a dedicated button to install Google Play Services name "Open GApps". Link for more info
3 Steps process for Genymotion 2.9 or below:-
4.4 Kitkat
5.0 Lollipop
5.1 Lollipop
6.0 Marshmallow
7.0 Nougat
7.1 Nougat (webview patch)
8.0 Oreo
8.1 Oreo
9.0 Pie
Download from above link
Just drag & drop downloaded zip file to genymotion and restart
Add google account and download "Google Play Music" and Run.
EDIT 2
After three months we can say: no more official Google Apps in Genymotion and CyanogenMod-like method is only way to get Google Apps. However, you can still use the previous project of the Genymotion team: AndroVM (download mirror).
EDIT
Google apps will be removed from Genymotion in November. You can find more information on the Genymotion Google Plus page.
Choose virtual device with Google Apps:
Done:
Now there is official FAQ for using Google Play in How do I install Google Play Services?, here the FAQ text:
For intellectual property reasons, Google Play Services are not
included by default in Genymotion virtual devices. However, if you
really need them, you can use the packages provided by OpenGapps.
Simply follow these steps:
Visit opengapps.org
Select x86 as platform
Choose the Android version corresponding to your virtual device
Select nano as variant
Download the zip file
Drag & Drop the zip installer in new Genymotion virtual device (2.7.2 and above only)
Follow the pop-up instructions
Please note Genymobile Inc. and Genymotion assume no liability
whatsoever resulting from the download, install and use of Google Play
Services within your virtual devices. You are solely responsible for
the use and assume all liability related thereto. Moreover, we
disclaim any warranties of any kind for a particular purpose regarding
the compatibility of the OpenGapps packages with any version of
Genymotion.
Alright, this is probably the easiest way to do it:
First of all, you will have to install GAPPS.
Next, open the virtual box and wait for the home screen to show up on Genymotion.
Drag and drop the GAPPS folder that you had downloaded earlier on into Genymotion.
You would get a prompt. Click OK. You would see a lot of errors, but just ignore them and wait for the successful prompt to come up. Click OK again and restart the virtual device.
A Google account screen should show up. Open up the playstore app if it doesn't show up. Sign into your account. Again ignore the errors.
The playstore should open now and should be fully functional.
I could flash the ARM translation but not the gapps, using https://stackoverflow.com/a/20013322/98057. I got the 'Ooops, something went wrong while flashing gapps-jb-20121011-signed.zip' error mentioned above. If you read the Genymotion logs and find an entry like:
Sep 16 23:00:02 [Genymotion Player] [Error] [Adb][shell] Unable to finished process: "Process operation timed out"
Try to apply the flash using adbdirectly:
$ adb -s 192.168.56.101:5555 shell "/system/bin/check-archive.sh /sdcard/Download/gapps-jb-20121011-signed.zip"
$ adb -s 192.168.56.101:5555 shell "/system/bin/flash-archive.sh /sdcard/Download/gapps-jb-20121011-signed.zip"
$ adb reboot
Change these commands according to what your log files say (the path and IP will probably be different).
I found the Genymobile log files in the following folder, by the way:
~/.Genymobile/Genymotion/deployed/<device name>/genymotion-player.log
Google Apps KitKat for Genymotion.
Download the Google Apps ZIP file from the link which contain the essential Google Apps such as Play Store, Gmail, YouTube, etc.
https://www.mediafire.com/?qbbt4lhyu9q10ix
After finishing booting, drag and drop the ZIP file we downloaded named update-gapps-4-4-2-signed.zip to the Genymotion Window. It starts installing the Google Apps, and it asks for your confirmation. Confirm it.
Try to do all the steps specified in the link below and before that upgrade VirtualBox to 4.2 by following the instructions in VirtualBox 4.2.0 Released With Support For Drag'n'drop From Host To Linux Guests, More. Then upgrade Genymotion to the latest version.
Go to the desktop and run Genymotion. Select a virtual device with Android version 4.2 and then drag and drop the two files Genymotion-ARM-Translation_v1.1.zip first. Then Genymotion will show progress and after this it will promt a dialog. Then click OK and it will ask to reboot the device. Restart ADB. Do the same steps for the second file, gapps-jb-20130812-signed.zip and restart ADB.
I hope this will resolve the issue. Check this link - it explains it clearer.
If anyone got an error while signing in to Google and this message appear:
Couldn't Sign In
can't establish a reliable connection to the server...
then try to sign in from the browser - in YouTube, Gmail, Google sites, etc.
This helped me. After signing in in the browser I was able to sign in the Google Play app...
Sometimes "ARM Translation Installer v1.1" is not working.. Here is the simple solution to install Google Play.
Go to this link: http://www.mediafire.com/download/jdn83v1v3bregyu/Galaxy+S4++HTC+One++Xperia+Z+-+4.2.2+-+with+Google+Apps+-+API+17+-+1080x1920.zip
Download the file from the link and extract to get the Android virtual device with Google Play store. The file will be in the name as “Galaxy S4 HTC One Xperia Z – 4.2.2 – with Google Apps – API 17 – 1080×1920″.
Close all your Genymotion store running in the background.
Copy that extracted file in to the following folder.
C:\Users\'username'\AppData\Local\Genymobile\Genymotion\deployed
After you copy you should see this path:
C:\Users\'username'\AppData\Local\Genymobile\Genymotion\deployed\Galaxy S4 HTC One Xperia Z - 4.2.2 - with Google Apps - API 17 - 1080x1920
Inside the “Galaxy S4 HTC One Xperia Z – 4.2.2 – with Google Apps – API 17 – 1080×1920″ folder you will see many *.vmdk and *.vbox files.
Now open VirtualBox and select Machine->Add and browse for the above folder and import the *.vbox file.
Restart Genymotion. Done.
I wanted to try my hand at programming android devices, so I followed the directions from the android website, installed the sdk, the java sdk, and eclipse. My computer is Windows 7 64-Bit, but I have the 32-bit Java SDK and Eclipse installed since hearing that there are issues with the 64-bit versions.
I am running the most recent version of the Android sdk, 4.0 R15.
I believe followed all of the instructions for installation, but when I load up a sample (Lunar Lander in this case), it loads the emulator, but will not install the app to it. ADB does not show the emulator listed when I use "adb devices", the DDMS perspective in eclipse does not detect any device either. In the emulator I have activated the USB debug setting in the developer area.
I have tried restarting the adb server, and have reinstalled a few times.
I even copied what one guy did on a youtube tutorial for a hello world program, and it still would not load to the device.
Does anybody have any idea how to get the emulator and eclipse talking so I can actually run and debug programs?
Try to adb kill-server and then do adb command like adb devices which will start adb again.
It helps in my case.
Best solution I found is this:
Open DDMS(Window->Open Perspective->DDMS)
In DDMS in the left side there is a Devices tab, a little below there is a list of items, choose little triangle called View Menu, under it find Reset adb and launch it.
After that I get my emulator detected.
Create new AVD following Window->AVD Manager->New (Give a name to your device & select the target) -> Create AVD.
Select the AVD that you created and Click Start to launch the devie.
Only on launching, the device is displayed under adb devices.
For starters, I think you can try the 64 bit versions of Java and Eclipse for Windows. I've Windows 7 64-bit edition, 64-bit java and eclipse versions and all work very well, without any glitches. I however have a question. Where exactly have you installed Android? I mean, using the installer that's available in the Android Developer website. If you've installed it in C:\Program Files, then try re-installing it in C:\ directly instead of Program Files directory. I had faced issues when the directory was C:\Program Files and then I changed it to C:\ .
I noticed that if you allocate a lot of memory to the device it can "freeze" when starting, if frozen for a sufficient period it disappears from the adb devices list. Try reduce the memory footprint of the application?