Android emulator not starting window 10 - too many emulator instances - android

This might seem to be a duplicate of it seems too many emulator instances are running on this machine. Aborting but that question was asked 5 years ago and nothing in the answers to it have helped me. I really think this is a different situation entirely.
I'm doing something very simple. I installed Visual Studio 2019 with Xamarin and the Android emulator.
I try to start the emulator from the command line and I get...
C:\Program Files (x86)\Android\android-sdk\emulator>emulator.EXE -no-boot-anim -avd VisualStudio_android-25_x86_phone -prop monodroid.avdname=VisualStudio_android-25_x86_phone
Windows Hypervisor Platform accelerator is operational
emulator: ERROR: It seems too many emulator instances are running on this machine. Aborting.
If I add the -verbose switch I get a huge list of messages, none of which seem relevant so I haven't included them.
This is what I know:
Windows Hyper Visor and the Platform features are enabled.
There are no other emulators active on the machine. Ports 5554, etc are not used.
HAXM acceleration is not enabled.
I have plenty of memory and disk on this machine and the emulator is configured for 512MB of memory
Genymotion emulators are not an option...I need to use Hyper V.
Windows version 10.0.17763.678
All patches to Android tools installed.
No special AV installed. Using Windows Defender.
Tried disabling firewall briefly. No help. I've never had any issue with firewall and local machine traffic.
Any ideas?

Ok...I got the emulator running. I'm really not sure what was wrong. I've spent a few days uninstalling, reinstalling, updating and finally the thing is running. To anyone else who has this issue...I feel your pain.
Here are some suggestions:
Get the code running on an actual physical phone. This worked straight away for me. This gave me some confidence that there was nothing wrong with the code or deployment.
Install and run the emulator on another dev box. Again this worked straight away. This gave me confidence there was nothing wrong with the dev box configuration that inherently prevented the emulator from running. Now I could put dev boxes side by side and investigate the divergent behavior. Did not discover any smoking guns this way, but again it built confidence.
Start the emulator directly from the command line using something like this...
c:\Program Files (x86)\Android\android-sdk\emulator>emulator -partition-size 512 -no-boot-anim -verbose -feature WindowsHypervisorPlatform -avd Android_Accelerated_x86_Nougat -prop monodroid.avdname=Android_Accelerated_x86_Nougat
Reboot/restart often. What I failed to detail in my original post is that I am using Xamarin. Long time users of Xamarin know that this stuff is really brittle. It has gotten a lot better in recent years, but this latest experience shows that it is still very tempermental and problems often disappear after restarting VS or rebooting your machine. Really demoralizing.
Good luck!

I have faced the same problem, i disabled the application control from the antivirus software i use and the problem solved the emulator started working properly.The port that the emulator uses is restricted by the application control feature that is enabled in antivirus software so try disabling it and relaunch the emulator.

I turned off Bluetooth in Windows 10 notification area and that helped me.
https://i.stack.imgur.com/7Qo1t.png

I just solved this by turning off windows hypervisor platform in turn windows features on off and restart your computer. When emulator works normally turn on it again.
Happy coding!

Related

Android Studio emulator: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

My android studio emulator not starting. I'm using Android Studio 3.0 on Ubuntu 17.10
Error - Emulator: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
I solved it by going into my virtual device's settings and changing "Emulated Performance" from "Automatic" to "Software".
I solved this problem by changing my graphics driver from Software and Updates. Head over to Additional Drivers and Use the proprietary and tested one.
Check if it helps. Thanks
Changing "Emulated Performance" from "Automatic" to "Software" was a temporary solution for me (I am on Linux btw). The simulator would crash in a few seconds.
Instead this did it for me:
cd ~/Development/Android/Sdk/emulator/lib64/
mv libstdc++ libstdc++.bak
credit: https://cialu.net/android-studio-how-to-solve-emulator-libgl-error-on-ubuntu-systems/
I have this problem to Emulated Performance = software doesn't help, because your emulator will be broken and can not be working if your app needs more process...
I have Ubuntu 18 and install my graphics card Nvidia, and it's solved
now
for ubuntu you can try it:
For Nvidia
sudo apt-get install nvidia-352 "nvidia-352 is an EXAMPLE In my Device"
and For AMD
sudo apt-get install fglrx
more details:
enter link description here
When use Linux spatially Debian and Ubuntu after update card graphic driver or etc. this problem happening often.
So you need just reboot your OS
Restarting the computer worked for me.
Changing the Emulated Performance from automatic to software made it work, but at least on Ubuntu, that has a poor performance.
I solved this issue by simply creating a new virtual device.
The problem is in the linux video card, to solve in Ubuntu 18 or derivatives, just go to "Programs and Updates" -> "Additional Drivers" and select the proprietary driver of your video card and then restart the computer. It resolved for me.
I had the same error tried starting emulator. I am installing android studio 3.5 on Ubuntu 18.04 and NVIDIAM GF119. In Software and Updates, under Additional Drivers tab, I chose the proprietary tested driver for my Graphic card. Then the emulator works.
Found everyone's solution was not working for me. Updated video card on linux and still had the issue.
What worked was changing the number of processor cores available to the emulator from 4 to 2.
I tried the other solutions, but this makes sense as I have 8 processor cores and may need to have several emulators open.
My current configuration is shown in the attached image my emulator configuration
This is most likely an issue with your graphics card driver, i would recommend doing a clean re-install of the driver if it doesn't fix itself on reboot.
For flatpak users on linux, i recommend running "flatpak update" in the terminal to update your GPU dependencies for flatpak (it typically breaks if you update your GPU driver and not flatpak GPU libs), this is what resolved the issue for me.
I made this answer because switching to software rendering isn't really a solution, it's more of a dirty workaround, and will only waste your CPU utilization.
I'm using Ubuntu 20.04.2 and driver install solved the problem.
sudo ubuntu-drivers autoinstall
After finishing the install, need to reboot.
reboot
I had the same problem, my emulators were stopping with SEGV. Both on software and hardware graphics. But after looking in journalctl it was apperantly SELinux that was blocking the emulator. Here I used the SELinux troubleshooter to add a bypass and after that the emulator booted fine.
select this update.work for me.
I was getting the same error using intel graphics on ubuntu 20.04 on a lenovo yoga 260.
I tried lots of answers on stack overflow, and none seemed to work. I could not select 'software' from the gui rather than auto. But then I found this page:
https://developer.android.com/studio/run/emulator-acceleration
And I ran this at the command line and it worked. I don't care if it's slow: at least it doesn't crash.
cd ~/Android/Sdk/emulator
./emulator -avd Pixel_2_API_30 -gpu swiftshader_indirect
I solved this issue by changing the permissions for the img files
cd /home/[your_user]/.android/avd/[device_name]_API_[API_version].avd
chgrp libvirt *.img
chmod 766 *.img
In the SDK Manager, under SDK Tools tab, make sure that you've the latest "Android Emulator".

Android emulator has no network connectivity on Linux

I had this problem for weeks. I tried the common suggestions of running it via emulator -avd namehere -dns-server 8.8.8.8 and turning off other network adapters but to no avail.
Networking is fine in Windows but I had no such luck with either Manjaro or Ubuntu.
Any ideas why this would not work in a Linux dev machine? Thanks.
I had the same problem. People told me to do complicated tasks, here's what worked for me:
Open emulator and just turn on data and in wifi settings connect to wifi named Android.
Well it turns out to NOT be a connectivity issue (I remember being able to ping 10.0.2.2 using adb shell).
It has something to do with a GPU driver error, since I'm always getting this error when I start the emulator. So it's most likely the browser not rendering the page, giving the illusion that there's no connectivity.
"Some users have experienced emulator stability issues with this driver version."
Came close to joining the Windows army. In case someone runs into a similar problem, with the primary symptom being the page really not loading (as opposed to it saying "There is no Internet connection").
Start the emulator with the -gpu off switch. It makes the difference in my case.
i solved by modifying nameserver
gedit /etc/resolv.conf
nameserver 8.8.8.8
nameserver fe80::1%eth0
nameserver 8.8.4.4

it seems too many emulator instances are running on this machine. Aborting

When I run it from the SDK manager, the loading process works, but once it is done, a flash of the emulator appears then quickly disappears.
Sometimes after it loads, nothing happens.
At the worst when it loads, I get the "too many emulator instances are running on this machine. Aborting" message.
I want to start making apps, but this seems to be the only thing stopping me!
I had already turned off Windows Firewall.
pl'z, give me solution
Eclipse Indigo; r12, Windows 7 (64)
The Android emulator uses loopback ports (5554, 5556, etc) to communicate with the external ADB. If it can't do so, it assumes that other emulator instances are occupying these ports.
Failure to do so can be because:
A) Your ports are occupied? Try netstat -an | grep 5554
B) Your loopback interface is not configured - You said you're on Windows - Make sure Windows Loopback is configured (try pinging yourself). (On Linux the same would be achieved by "ifconfig lo", and see. It should be configured, with the right IP (127.0.0.1) and up.
Incidentally, it's MUCH easier to use Android SDK on Linux, because that way both target and host are Linux. Consider running the whole thing in a VM image - and your SDK Experience will be immeasurably easier. From experience.
I also had an error problem ERROR | It seems too many emulator instances are running on this machine. Aborting. in the emulator windows command.
I had a lot of virtual networks, all of which were active, because of the VirtualBox and vmware installation.
Solution: Disabling all those networks solved my problem.
For me, the reason is that I was using wsl-based docker on Windows.
Try disabling the option Use the WSL based engine in the docker settings (which resorts to using Hyper-V)
Enable Hyper-V in Windows Features.
Restart your computer and you should see it work like a charm.
My virtualbox VM, android emulator and docker now works together!
I have Hyper-V enabled (Intel CPU) for use with Docker and WSL2, on Windows 10 21H1.
Returning to Android programming after a hiatus, I reinstalled Android Studio today (4.2). It tried and failed to install HAXM (which is not surprising as it won't work with Hyper-V). I then was unable to open Android virtual devices.
After hunting around for answers (mostly people saying to disable Hyper-V which I was not ready to give up on), I found the exact process command line for the emulator and ran it in an admin window for good measure. Enter the "it seems too many emulator instances are running on this machine" error, previously invisible, which led me here. I checked ports and shouted into the void - nothing helped.
Then I rebooted, on the off chance something in all those attempts was somehow still holding resources (despite killing every related process).
The Android virtual device worked after that reboot, with Hyper-V still active. I hadn't changed anything that should have required a reboot, but evidently some resource(s) were locked along the way in my previous session.
(Also note that if you don't touch/edit \qemu.conf on whatever drive you run from (typically C:) you will see the incorrect Your emulator is out of date error if running from the command line.)
Just enable Hyper-V from Windows features

Emulator not working in Eclipse

I followed this tutorial to create HelloWorld Android app.
I was able to start the emulator from eclipse.
But nothing seems to happen except this Android logo keeps flashing on.
Has anyone faced this issue ?
You'd better wait about 10-15 (it depends on your computer). But if it doesn't work, try in command prompt:
adb kill-server
adb start-server
If adb is not found, then you should move your directory to the folder, where adb.exe is located, for me it is
C:\Users\Andranik\android-sdks\platform-tools, therefore:
cd C:\Users\Andranik\android-sdks\platform-tools and after this execute upper commands.
This helps me.
It's working.. It is simply super slow ;)
Keep waiting a while longer and it will boot eventually. It helps to choose smaller devices with less ram.
Just a heads up, loading devices like tablets or the newest phones can easily take you 20-30 minutes.
If you planned not to use Google API as target of your emulator then u can use Intel x86 Hardware Accelerator(HAXM). Open your SDK manager then install Extras-->Intel x86 Hardware Accelerator(HAXM).Install it from
sdk_path\extras\intel\Hardware_Accelerated_Execution_Manager\IntelHaxm.exe (Windows)
Then on your emulator configuration choose Intel Atom (x86) as CPU/ABI rather than ARM.
Additionally you can set more ram to your AVD and check Use host GPU to speed up your emulator.

Android SDK's Intel HAXM disabled after installing Hyper V

I'm developing a suite of mobile apps - specifically Windows Store/Mobile 8 and Android.
Having installed VS2012 and then Monodroid, I was then able to start x86 Android images in the emulator and take advantage of the Intel HAXM acceleration (emulator output confirms HAXM working) to make the VM buttery-smooth.
I then installed the Windows Phone 8 SDK - which enables the Hyper V role - and now the emulator says it can't find HAXM. I then uninstalled and tried to reinstall HAXM, but now it won't - saying that my processor doesn't support it.
The VT-x extensions are still enabled in the BIOS - so I'm thinking that Hyper-V has blocked the Intel HAXM from working.
Of course it's not a killer - but a non-accelerated Android image is considerably slower than one with HAXM enabled - anybody else encountered this problem? Googling isn't bringing up anything obvious...
Update (30th Nov 2012)
Per #alexw's suggestion I tried stopping & disabling Hyper-V; with a restart. It still doesn't work.
I realise the next step is probably to the Windows Phone SDK (and remove Hyper-V) and then try again - to confirm that it really is the presence of Hyper-V. At the moment this is less than convenient - but I'll try and do it soon and update.
The best thing you can do to get HAXM detect VT again, is turning the whole Hyper-V "Feature" off. Open "Control Panel -> "Programs" -> "Turn Windows features on or off" (under "Programs and Features") and locate "Hyper-V", uncheck, reboot.
Looks like Hyper-V and HAXM are mutually exclusive, which is kind of a nuisance, because you even need to reboot twice to enable or disable either feature.
I was in your same case that needed to support Hyper-V and Intel HAXM. Disabling and enabling the feature and then restarting was overkill so I found an alternative solution.
You can create 2 boot entries, one for Windows with the regular configuration of Hyper-V enabled and another one with Hyper-V disabled. I logged in with the second one (Hyper-V disabled) and I was able to install Intel HAXM.
To accomplish this you need:
Open a command prompt as Administrator
Enter the command: bcdedit /copy {current} /d "Windows 8 - No Hyper-V"
This will output an id with the format {GUID} that you need to copy it to use it in the next command.
Enter the command: bcdedit /set { copied GUID of step 3 } hypervisorlaunchtype off
More details in this post.
I had a similar problem installing HAXM on Windows 8. I did the following with no effect:
Disabled hypervisor using the instructions here (http://blogs.msdn.com/b/virtual_pc_guy/archive/2008/04/14/creating-a-no-hypervisor-boot-entry.aspx)
Double checked that processor supported VT-x and was enabled in BIOS (BIOS said "supported", but there was no option to turn it on
Verified that all Hyper-V services in control panel were stopped (and never automatically started)
Performed a complete shutdown and a cold boot up.
However, I tried installing VirtualBox after the above actions (VirtualBox installed fine) and created a new VM. Running the VM caused my machine to blue screen, but after the reboot HAXM installed fine. Perhaps running VirtualBox flips some sort of flag at the OS level to allow HAXM to install.
I was also running AVAST at that time, and according this (Running the new Intel emulator for Android), that may cause a problem. However, I didn't have to disable AVAST to get HAXM installed.
You could try stopping the Hyper-V service when not needed and re-enabling it when you want to work on a WP8 project. It's a pain but the performance improvement offered by HAXM is immense.
Open services.msc, find the hvboot service (Hyper-V) and stop it. If this doesn't help you may need to disable the service and restart your pc.
I had the same problem. After a long search I found the answer. In my case, I had installed Avast Antivirus, first uninstall avast, reboot your PC, install Haxm, reboot. you can install again antivirus.

Categories

Resources