136

I think it's a problem with the SDK reference in Project Structure, but when I click run and I choose Launch Emulator nothing appears.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
Alessandro Mattiuzzi
  • 2,309
  • 2
  • 18
  • 24
  • 6
    I had a similar problem and it was caused not by the version of the SDK in the emulator but by the ammount of RAM, there is a warning when you create the image that says that emulating more than 768MB can cause problems on Windows and i fixed it that way (i was trying to create it with 1GB RAM), now with 768MB it runs fine. – VoidMain May 23 '13 at 15:51
  • 1
    May be you have a crush at the moment the application started, may be your application minimum SDK is higher then your emulator SDK, may be there is a problem in your PC. There are so many options to why this want work... Without more info we only can guess. – Ilya Gazman May 23 '13 at 14:49
  • I have "old" sdk Android for Eclipse and Emulator start normaly there. I used 1.6 JDK but the strange think is that i don't get any failure message in AS. – Alessandro Mattiuzzi May 23 '13 at 15:04
  • I created new virtual device in manager with Google Api 2.2 and now it's starting.....sorry – Alessandro Mattiuzzi May 23 '13 at 15:09
  • I found the answer in this thread: http://stackoverflow.com/questions/26355645/error-in-launching-avd – Terabyte Dec 09 '14 at 14:14
  • I had the same problem and its all because of that i `don't have enough space` in my PC, so I've deleted some files and temp folder, now i have 5 GB free and its back to work perfectly. Good luck. – Iris Tako Apr 13 '20 at 19:15

53 Answers53

73

I had the same problem. I just created the AVD with 768 MB RAM and it did run fine!

UPDATE: November 2022
This answer was almost from 10 years ago and will most propably not work on current version of Android Studio.

FerdyRod
  • 1,016
  • 13
  • 23
  • 2
    Hey! Nice, it worked. Does anyone know the reason? Does this problem exists in android studios only? – Shail Adi Jan 31 '14 at 07:36
  • 2
    I had this problem with eclipse as well...so it seems like it has something with the Android SDK on Windows. (not verified - just a wag). – Timothy Lee Russell May 13 '14 at 04:49
  • 24
    For newbies like me. Tools > Android > AVD Manager. There you find the setting in "Android Virtual Device (AVD)" when creating a device, click "Show advanced settings". http://tinypic.com/r/ehhpms/8 Btw I tried 768 MB RAM, but did not work. Trying to run the emulator from the CMD with `emulator.exe -netdelay none -netspeed full -avd Nexus_S_API_21_2` gives me the error: `HAX kernel module is not installed!` (x86). Possible solution: http://stackoverflow.com/q/26355645/1066234 – Avatar Dec 08 '14 at 18:07
  • 1
    this worked for me. windows 7 - android studio 2.3.1 – Uğur Gümüşhan Apr 06 '17 at 23:05
  • 1
    This solution didn't work for me, but upgrading HAXM manually for x86_64 images did. See my answer for more info https://stackoverflow.com/a/46312480/539149 – Zack Morris Sep 22 '17 at 22:56
  • Worked for me on Windows 8.1 after enabling Haxm and setting ram to 768 MB. – Andrew Chelix Dec 09 '20 at 11:57
  • This does not work – Jeyaseelan Mar 08 '22 at 12:17
  • @Jeyaseelan this solution work almost 10 years ago. Android Studio has improve since and mostly likely has another way to fix this. Hope you can solve your problem! – FerdyRod Nov 24 '22 at 15:54
47

I had a similar problem... Android Emulator doesn't open. You need to discover the reason of this... You could run your emulator from the command line. For this you could copy and paste your command line from "Run" or "AVD" Android Studio console. For example:

"{path}\android-sdk\tools\emulator.exe -avd Default_Nexus_5 -netspeed full -netdelay none"

When you launch it from a command line terminal, It give you a message with the error. In my case it was useful for discover the problem:

..\android-sdk\tools>emulator: ERROR: x86 emulation currently requires hardware acceleration! Please ensure Intel HAXM is properly installed and usable. CPU acceleration status: HAX kernel module is not installed!

  • I needed to activate GPU acceleration with a tool to enable it on my machine. I solved it installing from SDK Manager the tool HAXM...

  • I had another problem... For example i had assigned a bad url for skin path of my virtual device... To solve it I have configured my virtual device with a valid skin from my platform sdk: '{path}\android-sdk\platforms\android-{number}\skins{SCREEN_SIZE}'

Now it is opening fine.

Update 8/8/2019:

For newer version of Android SDK, emulator path should be:

"{path}\android-sdk\emulator\emulator.exe"

reference (thank you @CoolMind)

Ariel Carrera
  • 5,113
  • 25
  • 36
  • 1
    I tried it on the command line and all I got was "X Error of failed request: BadRequest (invalid request code or no such operation)". This explanation has left me confused and angry. Does it make sense to you? – john_science Mar 28 '15 at 03:56
  • 1
    Have you got an ATI video card? If you search the error message... you could find some people with same error message... In my case my error was different and i could resolve it by activating GPU acceleration in my pc bios and installing haxm tool. Your problem seems to be a similar communication problem between the android emulator and your video driver. – Ariel Carrera Apr 01 '15 at 05:39
  • 1
    Thanks for a command line. It helped me to see 'PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value [D:\Android]!'. Note that new versions of emulators require `Android\sdk\emulator\emulator` path, not `tools\emulator`, see https://stackoverflow.com/a/51627009/2914140. – CoolMind Aug 08 '19 at 07:59
  • @ArielCarrera, thank you very much! You made a great job and helped me to start an emulator (I couldn't do that for several months), see https://stackoverflow.com/a/57408085/2914140. – CoolMind Aug 08 '19 at 20:56
  • I'm glad it has been helpful! – Ariel Carrera Aug 08 '19 at 21:24
  • This helped me find issue – Trupti Nasit Oct 11 '21 at 10:40
  • "The term 'emulator.exe' is not recognized as the name of a cmdlet," I ran it from cmd.exe but it does not show any error. Unfortunate. – MwBakker May 25 '22 at 13:55
44

In my case the android hangs at start up. I solved by wiping user data and forcing a cold boot, using Android Virtual Device Manager (Tools->AVD Manager)

enter image description here

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
MiguelSlv
  • 14,067
  • 15
  • 102
  • 169
23

It seems that "Waiting for target device to come online ..." is a generic message that appears, always, when the emulator can not start properly. And what's the cause of that? As you can see, there could be many causes.

I think the best way to find the concrete error with the emulator is to start it within a terminal. So:

1 - Open a terminal and go to this folder:~/Android/Sdk/tools

2 - Start the emulator with this command:

./emulator -avd EMULATOR_NAME -netspeed full -netdelay none

You can see the name of your (previously created with AVD Manager) emulators with this command:

./emulator -list-avds

If everything is ok, the program doesn't start, and it writes in the terminal the concrete error.

In my case, the application says that there is a problem loading the graphic driver ("libGL error: unable to load driver: r600_dri.so"). As it is explained here, it seems that Google packaged with Android Studio an old version of one library, and the emulator fails when it tries to use my graphic card.

The solution? Very easy: to use the system libraries instead of the packaged in Android Studio. How? Adding "-use-system-libs" at the end of the command. So:

./emulator -avd EMULATOR_NAME -netspeed full -netdelay none -use-system-libs

The definitive solution is to set the ANDROID_EMULATOR_USE_SYSTEM_LIBS environment variable to 1 for your user/system. With this change, when I run the emulator within Android Studio, it will also load the system libraries.

PS 1 - The easiest way I found to set the environment variable, it's to modify the script that launches the Android Studio (studio.sh, in my case it is inside /opt/android-stuido/bin), and add at the beginning this:

export ANDROID_EMULATOR_USE_SYSTEM_LIBS=1

PS 2 - I work with Debian Jessie and Android Studio 2.2.3. My graphic card is an ATI Radeon HD 6850 by Sapphire.

UPDATE December 2017: I had the same problem with Debian Stretch and Android Studio 3.0.1 (same graphic card). The same solution works for me.

Pablo Insua
  • 852
  • 11
  • 19
11

1) Open SDK Manager and Download Intel x86 Emulator Accelerator (HAXM installer) if you haven't.

2) Now go to your SDK directory (C:\users\username\AppData\Local\Android\sdk, generally). In this directory Go to extra > intel > Hardware_Accelerated_Execution_Manager and run the file named "intelhaxm-android.exe".

In case you get an error like "Intel virtualization technology (vt,vt-x) is not enabled". Go to your BIOS settings and enable Hardware Virtualization.

3) Restart Android Studio and then try to start the AVD again.

It might take a minute or 2 to show the emulator window.

Abhishek Balani
  • 3,827
  • 2
  • 24
  • 34
  • 2
    in the SDK manager, next to x86 Emulator Accelerator (HAXM installer) in the STATUS column it says "Not compatible with Windows :-( – Darkloki Apr 18 '17 at 15:13
  • Only remove option is available after running "intelhaxm-android.exe" file. Is this expected behavior? – Tilak Dewangan Jun 10 '20 at 18:34
  • 1
    @Abhishek Balani, your solution worked for me and thanks a lot to you. After a day of trying, installing/uninstalling I found by following your steps that I had an older Intel x86 Emulator Accelerator 6.x when the latest was 7.x. So I went ahead and installed 7.x and after that restarted Android Studio. Also, I had to kill emulator instances by ending `qemu-system-x86_64.exe` in Task Manager since there was no emulator showing but they were running from before . If emulator didn't show up then it still was running in my case due to older version of accelerator. – Sunil Aug 13 '20 at 19:15
8

With Ubuntu, I had the same problem. I solved it by changing file /dev/kvm permission to 777:

sudo chmod 777 /dev/kvm
David Buck
  • 3,752
  • 35
  • 31
  • 35
davidcharlat
  • 81
  • 1
  • 1
7

If you are new to Android studio, you need to follow few basics steps in configuring the emulator.

  1. Make sure you have proper SDK installed
  2. Make sure you have Intel HAXM & virtualization option enabled in your BIOS
  3. Configure emulator correctly, download the Intel X86 Atom system image for better performance.
Dharman
  • 30,962
  • 25
  • 85
  • 135
Naruto
  • 9,476
  • 37
  • 118
  • 201
6

you need to install "Android Emulator"

Go to SDK Manger -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools. and set a hook at Android Emulator

Daniel Gohlke
  • 91
  • 1
  • 4
  • this could even help when it's already installed. so for me it worked by unchecking -> apply (deinstalling), check again -> apply (installing). And then my issue was gone :D – snap May 04 '21 at 14:30
4

I had the same issue in Android Studio 2.3.3 on Mac OS X 10.12.6 and the issue was caused by Android Studio using an old version of HAXM (6.0.3 when it should have been 6.2.1):

$ kextstat | grep intel
  148    0 0xffffff7f8342c000 0x14000    0x14000    com.intel.kext.intelhaxm (6.0.3) 50449AFC-F7C6-38A0-B820-233E8A050FD6 <7 5 4 3 1>

Removing and reintalling HAXM from within Android Studio according to the instructions didn't work: https://software.intel.com/en-us/android/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-mac-os-x

Instead, download the HAXM installer manually or if that link expires, find it under https://software.intel.com/en-us/android/tools under Intel® Hardware Accelerated Execution Manager (Intel® HAXM).

After running the installer, it now shows that the current version of HAXM is installed:

$ kextstat | grep intel
  169    0 0xffffff7f83472000 0x1d000    0x1d000    com.intel.kext.intelhaxm (6.2.1) 7B6ABC56-699C-3449-A0EC-BEB36C154E3C <7 5 4 3 1>

After upgrading HAXM manually, I'm able to launch x86_64 emulators.


Old answer, which might work instead (note that this didn't work for me for x86_64 images):

Create a new device:

Tools->Android->AVD Manager

+ Create Virtual Device

Tablet -> Nexus 7 -> Next

The Recommended tab should be highlighted.

Even though I had the API Level 25 SDK installed, it showed:

Nougat Download 25 x86 Android 7.1.1 (Google APIs)

So I clicked Download link which seems to have repaired the API Level 25 SDK. I finished creating my new device and it ran fine.

Unfortunately I had already deleted my old device, so if this works for someone else, please leave a comment here to let us know if your original device worked afterwards, thanks!

Zack Morris
  • 4,727
  • 2
  • 55
  • 83
4

In Android Studio 2.3.3 I was able to get my AVD to start and run by changing Graphics in the Emulated Performance section from Automatic to Software-GLES 2.0:

enter image description here

I was able to infer this after following the advice at https://stackoverflow.com/a/44931679/1843329 and doing:

$ ./emulator -avd Nexus_4_API_21 -use-system-libs

which resulted in:

emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.

And when I did:

./emulator -avd Nexus_4_API_21 -use-system-libs -gpu off

the emulator then launched.

snark
  • 2,462
  • 3
  • 32
  • 63
2

I'd like to post a link to this answer as it might help out any persons in this thread running into issues starting a virtual device with more then 768 mb of memory; How to make an AVD with > 768MB RAM To emulate Galaxy devices

Community
  • 1
  • 1
Annihlator
  • 204
  • 1
  • 2
  • 12
2

I have similar problem but I have solved it by switching to "Android 4.2.2 armeabi-v7a" (I needed to test it on Jelly Bean) in my AVD and it fixed the problem for me.

What seems to happen is that my processor is AMD and Intel X86 hardware emulation couldn't start. So I changed to use "API" other than "x86" (even though it recommended me to use x86). Hope this helps.

Sicha
  • 37
  • 1
  • 3
2

I spent several hours on this problem. What worked for me was opening the Tools->Android->SDK Manager, choosing Android SDK under System Settings on the left of the screen and going to the SDK tools tab. I then unchecked the settings for Android emulator and the Intel x86 Emulator Accelerator. I applied these changes, restarted Android Studio and then re-checked these option and applied the changes. The program reinstalled the emulator components and things seem to work. Hope this helps someone.

Eric S
  • 105
  • 1
  • 9
2

enter image description here

Wipe data of AVD like that picture and run your program. it's work for me.

Pierre.Vriens
  • 2,117
  • 75
  • 29
  • 42
2

If anyone is still having trouble with launching the avm take note of the android studio event log when you try to run the avm. When I tried running the avm android studio mentioned that my environment variable ANDROID_SDK_HOME was set to the same place as ANDROID_HOME and it shouldn't be. It recommends deleting the variable ANDROID_SDK_HOME which I did and then restarted android studio and avm started working.

Marc Marti
  • 31
  • 3
2

Access the BIOS setting and turn on the virtualization feature. Mine was together with options like cpu fan speeds and stuffs. Then make sure that Hyper-V is turned off in the windows features ON/OFF. Then reinstall the intel HAXM, this should fix this issue.

D1p3
  • 21
  • 2
2

edit this file: sudo nano .android/avd/your_emulator.avd/config.ini

change lines

hw.gpu.enabled = yes
hw.gpu.mode = auto

to

hw.gpu.enabled = no
hw.gpu.mode = off

It works for me !

M E S A B O
  • 783
  • 1
  • 11
  • 15
2

just check out if you have this problem "vt-x is disabled in bios"

enter image description here

in this case you need to enable virtualization technology bios

Yunnosch
  • 26,130
  • 9
  • 42
  • 54
A.charef
  • 1
  • 1
1

It probably won't start because you

OR

  • don't have the correct SDK downloaded

If you migrated your project from Eclipse chances are that on running an emulator you will get stuck with this message not seeing anything else:

Waiting for device.

If you open the device manager you probably see something like this:

enter image description here

Just recreate your devices.

Community
  • 1
  • 1
Amio.io
  • 20,677
  • 15
  • 82
  • 117
1

I've faced similar problem. You can edit the configuration or create new AVD with higher RAM. Also try increasing Heap to 128. Emulator will work smoothly even without HAXM

Artjom B.
  • 61,146
  • 24
  • 125
  • 222
satyapol
  • 983
  • 11
  • 16
1

I had the same problem. I just Created New AVD with 768 MB RAM and it did run fine for me. I Used for API 22(Lollipop Version).

Snoopy
  • 71
  • 1
  • 8
1

I faced the same problem. From some research that I did, I realized that my computer does not support virtualization. So I had to install BLUESTACKS. Believe me it worked...you can also try it.

  1. Just go to your directory C:\Android\sdk\platform-tools and double click adb
  2. Ensure that your bluestack is running.
  3. When you try to run the project, it automatically shows up to run with the bluestacks....just choose the bluestack and you are done.

If you want the setup of bluestack, just google it you can have a number of sites to download from for free.

Young Emil
  • 2,220
  • 2
  • 26
  • 37
1

Besides using an external emulator such as bluestacks, you can also create a new new AVD and choose a system image with an ABI of armeabi-v7a with an API level of 21, instead of choosing ABI of x86 which fails. I was having the same problem, i tried this and it worked. hope this will be useful as well.

Young Emil
  • 2,220
  • 2
  • 26
  • 37
1

Check if the following tools are installed or not in the Android SDK Manager as shown in this picture: enter image description here

Jeffrey Bosboom
  • 13,313
  • 16
  • 79
  • 92
kiranvarma
  • 131
  • 1
  • 3
1

One reason could be that the chosen ABI does not fit to your system. For me, only arm64 is working.

pic1 pic2

Bevor
  • 8,396
  • 15
  • 77
  • 141
  • Do you have AMD processor? – Sanchit Oct 06 '17 at 08:41
  • @Sanchit Yes. But it's so friggin slow that emulators are hardly usable. (I never use them) – Bevor Oct 06 '17 at 08:57
  • This answer resolved my problem which cropped up on an M1 Mac. If you want more details than above, here is an article: https://confessionsofanagilecoach.blogspot.com/2021/12/androidstudio-development-with-m1-mac.html – Lance Kind Dec 11 '21 at 18:30
1

I had the same problem on Windows 10, after I moved my android-SDK folder to D:/ as I was low on space on c:/.

It turned out that the Android emulator looks for Android SDK via Global (environment) Variables, not the path defined inside Android Studio.

So I edited the Environment variable of ANDROID_HOME and that was it.

SarkawtNoori
  • 176
  • 1
  • 6
1

If your emulator worked fine but suddenly it doesn't, just restart the machine and run again.It worked for me.

ajw
  • 2,568
  • 23
  • 27
1

I performed the procedure below, and was successful. Execute this command down.

npx react-native info

This command return the log file the npm (example)

C:\Users\Robinho\AppData\Local\npm-cache\_logs\2020-11-22T19_35_23_842Z-debug.log

In my case was permission in dir file in windows SO.

buddemat
  • 4,552
  • 14
  • 29
  • 49
1

I restarted my computer clicked F1 for the Bios setting and checked the virtualization technology box and saved the changes. The AVD worked without glitches after my computer booted. This article explains it. Hope somebody finds this helpful.

David Ouma
  • 41
  • 3
0

I was having this same problem. I decided to create (see the button at the lower-left). I defined the image to match my device and that seems to work.

I am thinking with Android Studio at version 1.0.1, there are still plenty of bugs.

KnumSoft
  • 71
  • 1
  • 2
0

Just check the error log it is necessory that yoou should know the fault. It may be window acceleration HAXM error as mentioned above you have to install it separately in that case... generally the path is c:\users\youruser\appdata\local(run some bat file named like HAXM)

here the error pops in android studio is and above was the solution to this .. \android-sdk\tools>emulator: ERROR: x86 emulation currently requires hardware acceleration! Please ensure Intel HAXM is properly installed and usable. CPU acceleration status: HAX kernel module is not installed!

tell me further if the issue persists altough after this i suppose you will be able to see nexus 5 emulator on screen

0

now I use android studio on mac, I have the problem. When I executed emulator in cmdline, I got error message. So I thought that there maybe not was the exe permission on emulator. Then when I added the permission on it by chmod ,everything work.

zhouxy
  • 243
  • 2
  • 6
0

if you are finding difficult in opening Emulator in Android Studio you can also download genymotion in your android studio.

Aman chauhan
  • 9
  • 1
  • 3
0

For the me issue was that I had 2 other Android Emulators running. Once I closed those, I was able to start the new one.

checkmate711
  • 3,301
  • 2
  • 35
  • 45
0

I had the same problem, but now I'm using it successfully. As you know, the minimum RAM required to run android studio is 4 GB, but if you only have 4 GB RAM, you probably won't be able to run many other applications at the same time.

It's also possible that some windows driver, e.g. graphics, is incompatible. You may want to experiment with software and hardware options for graphics: https://developer.android.com/studio/run/emulator-acceleration.html

It might also help to increase the connection timeout in settings/tasks.

Mark Miller
  • 3,011
  • 1
  • 14
  • 34
0

If you're getting

Failed on eglChooseConfig
Could not initialize emulated framebuffer

See this answer. You may not be in 32-bit color mode, which will cause android GPU emulation to fail.

https://stackoverflow.com/a/48529994/290072

Almo
  • 15,538
  • 13
  • 67
  • 95
0

Although some answers above suggest to increase the RAM of the AVD but this does not help me. The AVD seems to load forever, but at the end it does not go online.
In Android Studio 3.3.2 I was able to get my AVD to start and run by changing Graphics in the Emulated Performance section from Automatic to Hardware-GLES 2.0:

enter image description here

AAEM
  • 1,837
  • 2
  • 18
  • 26
0

I'm using Ubuntu 19.10, I too had the same issue what I just did is deleting all virtual devices and create a new one.

U.A
  • 2,991
  • 3
  • 24
  • 36
0

For me, on MacOS X, the emulator process was already running, but without the interface. I had to open MacOS Activity Monitor and kill the process qemu-system-x86_64. Afterwards, running the app launched the emulator successfully.

Select the process called qemu-system-x86_64 in Activity Monitor and click the X button to kill the process. Then click Run or Debug in Android Studio.

enter image description here

gorkem
  • 500
  • 6
  • 8
0

Uninstalling and reinstalling Intel x86 Emulator Accelator(HAXM) worked for me.

ri_zen
  • 1
  • 1
0

Precondition

If you have an Intel CPU you have to check to things:

  1. Intel x86 Emulator Accelerator (HAXM installer) is installed in your Android SDK (check under Settings -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools)
  2. Check if you have activated the Intel Virtualization Technology (VT) inside your UEFI/BIOS

Checking for problem

If the second bullet point (VT) is your problem can also be checked by running this command in the command line (needs Android SDK Command-line Tools (latest) to be installed in your SDK):

C:\Android\YourApp> C:\Users\{Username}\AppData\Local\Android\Sdk\emulator\emulator.exe -avd YourAVDName -netspeed full -netdelay none

# The First is your path to your SDKs emulator.exe; use the path you installed the SDK in
# -avd needs a name of an existing AVD you set up in the AVD Manager in Android Studio.

The possible outcome is (if HAXM is already installed and hardware acceleration is your poblem):

emulator: Android emulator version 30.5.3.0 (build_id 7196367) (CL:N/A) handleCpuAcceleration: feature check for hvf emulator: ERROR: x86_64 emulation currently requires hardware acceleration! CPU acceleration status: VT feature disabled in BIOS/UEFI More info on configuring VM acceleration on Windows: https://developer.android.com/studio/run/emulator-acceleration#vm-windows General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration.

Note that I used an AVD with x86_64 here.

Solution

You have to restart your PC and enter your BIOS. Search for you CPU-preferences (can often be found in an Advanced-options tab. Somewhere there you'll find a setting called Intel Virtualization Technology which presumably is disabled. enable and restart your computer.

Now your AVD should work fine.

Markus
  • 2,265
  • 5
  • 28
  • 54
0

If you're running it for the first time and happen to have less then 3 GB space on your drive, the emulator just fails silently.

Manuel Otto
  • 6,410
  • 1
  • 18
  • 25
0

Enable CPU virtualisation from BIOS settings. I had same issue, it fixed the issue.

Ajit Kumar
  • 1,157
  • 12
  • 21
0

The best way is to run the emulator with the terminal and see the error message.

cd /YOUR_SDK_PATH/sdk/emulator

Check emulators

emulator -list-avds

Run the emulator

 ./emulator -avd NAME_OF_EMULATOR

If the emulator has error, show you in the terminal

Rasoul Miri
  • 11,234
  • 1
  • 68
  • 78
0

The only way I got it to work on: Windows 10 x64 with AMD CPU

  1. Create a new device in Android studio, using the Pie, API 28

  2. Run it from command line, without acceleration:

    emulator -avd AVD_NAME -accel off  

(Emulator path: "C:\Users\USER_NAME\AppData\Local\Android\Sdk\emulator")


To get the list of AVD-s run:

emulator -list-avds

My versions:

  • Android studio 2021.2.1
  • Android emulator 31.2.10

Notice: It will be slower this way, since it's not using the hardware acceleration no more. I have to wait around 2min just to show the boot animation, but at least its working finally. The CPU is causing this issue, Intel HAXM can't be installed on AMD CPU, and AMD's WHPX is not working for some reason...

ALI3N
  • 302
  • 4
  • 10
0

if theres no trouble, just delete your actual emulator and create a newone, i did that and problem solved

0

I started the emulator and nothing happened (like in the picture below). But when I rotated the device (buttons on the top with blue arrows) it suddenly appears. Not sure if this really is a "solution", but it helped me.

Emulator did not start

Alexander Langer
  • 320
  • 2
  • 11
0

You will remove the android studio cache or reinstall it

0

I tried a bunch of answers but nothing. I had to run a combination of different answers to get the emulator to show. Ultimately you have to kill the emulator's .lock file then in Android Studio do a Cold Boot Now to restart it

Using a Mac, open terminal

1- cd into the emulator directory

cd ~/Library/Android/sdk/emulator

2- Get a list of all of your emulators

./emulator -list-avds

3- Copy whichever emulator you want to restart, for example my emulator is named Pixel_4_API_33_-_Adroid_12.avd

4- Enter the command below, but replace your emulator name from the 3rd step. Make sure to end the emulator with .avd

cd ~/.android/avd/your_emulator_name_from_3rd_step

or for an example using my emulator

cd ~/.android/avd/Pixel_4_API_33_-_Adroid_12.avd

5- You have to kill the .lock file. Run:

rm *.lock

6- Afterwards you can close terminal then Open Android Studio, go to Tools > Device Manager

7- When the Device Manager window opens, press the 3 vertical dots in the far right, then select Cold Boot Now

enter image description here

Your device should now restart.

8- If the emulator is still black, close Android Studio, reopen it, and Wipe Data, follow this answer

9- After the above steps, if you try to run an app and it doesn't work, close Android Studio, reopen it with your project, follow this answer, then run the app again.

10- Afterwards, if the emulator screen is black or won't start then follow this answer

11-You may also have to increase the VM Heap. I increased mines to 1024.

I had to complete all these steps to get it to start.

Lance Samaria
  • 17,576
  • 18
  • 108
  • 256
0

I had the same problem with booting Pixel Pro 6, API 33, x86_64. I was booting the AVD with the following command: emulator -avd name -writable-system, and in my log I saw this

...
INFO    | Warning: QImage::pixel: coordinate (1527,95) out of range ((null):0, (null))
INFO    | Warning: QImage::pixel: coordinate (1527,96) out of range ((null):0, (null))
INFO    | Warning: QImage::pixel: coordinate (1527,97) out of range ((null):0, (null))

So i set the following settings for device frame and this helped settings

Ivan
  • 316
  • 3
  • 15
-1

This could happen in EVERY version of AndroidStudio, but it's not AS fault. If you have another VM Manager (like VirtualBox) you MUST turn it off before launching AS Emulator. You can only have one hypervisor on a system, so if VirtualBox is running, AS Emulation can't run.

Rafa J
  • 61
  • 9
-3

In Android Studio click on wipe data.

android stduio click wipe data

tayfun Kılıç
  • 2,042
  • 1
  • 14
  • 11
-5

press Run and wait, if it says
"Device is not ready. Waiting for 20 sec."

press Run again. now it works :)

Zakiye Maarefi
  • 185
  • 2
  • 7