You have probably installed a new version of android studio, and then all of a sudden the emulator is not opening . It keeps displaying the message
Connecting to emulator.
and this is probably taking longer than usual.
I faced this same issue after installing anew version of android studio. I tried the following solutions from stack overflow
- Creating a new emulator
- Cold booting the emulator
- Wiping the emulator data
All these solutions did not work.
The solution.
So how did i solve this problem of emulator taking long and most importantly how can you solve it as well.
The emulator is taking long to connect mostly probably because your android emulator sdk is out of date.
So the solution to uninstall it or update.
To do this, head over to android studio
- From the toolbar of android studio open
Tools
- Then select
Sdk manager
from the dropdown menu - The android sdk section should appear.
- Under the 'Android sdk' section, select SDK tools tab.
- Under the
SDK tools
tab look for the android emulator - Uncheck the box appearing besides the android emulator and
click apply button
to unistall the emulator - After uninstalling, it should now display as not installed.
check the box again
toinstall
the emulator again. After installation it should appear as installed. Close android studio and open it again
And now when you click run
the emulator should open as expected.
Hopefully this solves your problem as it solved mine.
Top comments (2)
Hi,
in may case it did not help. I have spent several hours to run the emulator.
First, from logs I realized there was something wrong with the OpenGl (Help -> Show Log In explorer). I don' t know why because I have already run emulator just fine yesterday.
So I decided to change the rendering from Hw to Sw but this option was grayed out in AVD manager so I needed to find a config.ini of the virtual device and change hw.gpu.mode to swiftshader. After that the loading took too long.
So I have opened the command line and run the VD from emulator with
C:\Users\lenka\AppData\Local\Android\Sdk\emulator\emulator.exe -netdelay none -netspeed full -avd Pixel_API_26
After that I could run the emulator also from AVD manager.
Nice Piece