141

After updating to Android Studio 2020.3.1 canary 15, when I try to run an emulator, it gets killed with this error:

The emulator process for AVD Pixel_4_API_30 has terminated.

It was working correctly in the previous version (4.1.3), but now after installing the new one, it shows the same error.


I've tried some solutions had suggested in almost similar cases; however, It still doesn't work.

  1. I deleted my emulator (also I cleared inside of directory: /.android/avd/) and created a new one again
  2. I updated the HAXM installer to version 7.6.5
  3. I tried to run an emulator with lower APIs but...

Image of the error:

image of the error

halfer
  • 19,471
  • 17
  • 87
  • 173
Jatlin
  • 1,558
  • 2
  • 4
  • 12
  • Can you also add what OS you are using? I have just tried it on MacOS Big Sur 11.3 and it worked. Maybe "Invalidate Caches / Restart" would help. – Efe Budak May 01 '21 at 22:47
  • Not having enough disk space could give the same error message. Best way to find the correct cause is to look into log file at "C:\Users\\AppData\Local\Google\AndroidStudio2020.3\log" – Deshan Jan 26 '22 at 17:00
  • Also, if you just installed Android SDK Studio, rebooting your machine might help, this fixed the issue for me ^^' – kaiya May 03 '22 at 09:49

51 Answers51

120

The main root cause of that issue is lack of free space on your disk

Anatolii Shuba
  • 1,898
  • 1
  • 12
  • 16
  • 1
    Do you know how much space do you need to run the emulator? I have 7 GB Free Space and it doesn't work – Mauro Stancato Nov 19 '21 at 19:27
  • 1
    It depends on emulator type. Several are below from my setup (x86_64): Pixel_5_API_31 - 3.6GB, Nexus_7_API_28 - 2.4GB, Nexus_4_API_22 - 5.5GB, Nexus_5X_API_26 - 5.2GB, Nexus_5X_API_28 - 2.7GB, Pixel_API_21 - 5.6GB – Anatolii Shuba Nov 20 '21 at 21:00
  • 3
    @MauroStancato Failed to work with 1.2GB, worked with 6GB, took 100 MB of space on running. ¯\\_(ツ)_/¯ – reducing activity Feb 03 '22 at 18:28
  • @AnsalAli Lack of space is a main root cause but not the only one. Probably you have faced other root cause – Anatolii Shuba Feb 15 '22 at 14:16
  • right answer, something had taken almost all of the device internal storage. Recreated a new device with higher internal storage memory solved it, obviously depends on the actual available disk storage your computer has – mightyandweakcoder Apr 13 '22 at 14:54
73

Faced this issue after update to arctic fox.

After seeing error message about termination, open android studio logs

("C:\Users\YourUserName\AppData\Local\Google\AndroidStudio2020.3\log\idea.log")

scroll it down and try to find log line with text "Emulator terminated with exit code". Probably, the reason for termination can be found a few lines above this message - for me it was

"Emulator: cannot add library vulkan-1.dll: failed".

If you have the same reason - go to C:\Windows\System32 directory, search here for file called vulkan-1-999-0-0-0.dll and just rename it to vulkan-1.dll (i've made a copy just in case and named it "vulkan-1.dll").

This fixed the issue for me.

Marcel Hofgesang
  • 795
  • 1
  • 11
  • 34
DistantBlue
  • 940
  • 6
  • 9
  • 4
    I did not have the same issue but the look into the logs lead me to my solution so +1. For anyone interested mine issue was "Emulator: unknown option: -qt-hide-window" so I ran the command without it. – TheLibrarian Aug 02 '21 at 13:37
  • 9
    I was missing this file vulkan-1-999-0-0-0.dll . I downloaded it from the web. And copied the file with this name to System32 and also renamed its second copy to vulkan-1.dll and copied it to the same folder. It helped – Arty Morris Dec 02 '21 at 06:53
  • After the several hours of trying other possible solutions, only this was worked for me. A closer explanation of the issue and link for DLL download is mentioned on the following topic: https://stackoverflow.com/questions/65696048/android-studio-emulator-cannot-add-library-vulkan-1-dll-failed – redrom Dec 03 '21 at 10:34
  • 8
    i got the dll from https://www.dll-files.com/vulkan-1.dll.html hope this helps – Stevo Dec 20 '21 at 04:58
  • I was missing amdvlk64.dll and also vulkan-1.dll. Got amdvlk64.dll from internet and copied twice to System32 as vulkan-1.dll and amdvlk64.dll and it is okay now. Thanks! – SMhd Asadi Dec 23 '21 at 13:20
  • 2
    I didn't have the vulkan-1.dll file, but adding the advancedFeatures.ini file helped: Vulkan = off GLDirectMem = on > https://stackoverflow.com/a/68416846/10749567 – Ola Ström Dec 27 '21 at 16:20
  • I wonder why would the `vulkan-1.dll` be missing in the `C:\Windows\System32` directory – Chris Claude Jan 05 '22 at 22:41
  • 5
    The best solution is to completely skip the use of 'vulkan-1.dll' by adding the advancedFeatures.ini file with: Vulkan=off, GLDirectMem=on | https://stackoverflow.com/a/68344341/11211041 Then you don't have to download an unknown dll-file... – Snostorp Jan 10 '22 at 18:54
  • Not vulkan for me (`"Not enough space to create userdata partition. Available: 6123 MB at C:\...., need 7372 MB. "`), but big +1 for how to discover what's wrong! – TWiStErRob Feb 05 '22 at 19:29
  • Upvoting this for the path to the log file which lead to another error message that helped me find the solution here: https://stackoverflow.com/questions/67987153/android-studio-flutter-warning-another-emulator-is-still-running-windows-10. Although, renaming a DLL file seems dangerous. – Code-Apprentice May 22 '22 at 04:49
  • @TheLibrarian could you please share how to configure **Android Studio** to remove the `-qt-hide-window` param when starting the emulator from the IDE? – andreszs Jun 02 '22 at 22:51
55

Follow below steps to solve the issue:

  1. Go to Tools -> SDK Manager SDK Tools

  2. In SDK Manager Go To SDK Tools Tab and untick the Android Emulator and click on Apply. This step will uninstall the Android Emulator. Uninstalling Android Emulator

  1. After uninstallation completes: Again Open Tools -> SDK Manager -> SDK Tools -> Install the Android Emulator by enabling the check or tick on Android Emulator. This step will install the Android Emulator again.

  2. After successful installation. Restart Android Studio. Create new emulator device and Run it. This should work.

Dharmik Thakkar
  • 1,112
  • 7
  • 17
  • This method works well, but if you want to avoid reinstalling the Android Emulator, just update it and that will work. I'm using Ubuntu 20.04 and I just updated the Emulator API to the newest version. – Loich Mar 14 '22 at 10:05
21

Try to kill the emulator process and then you can reboot.

On Windows, bring out Task Manager and find the emulator process (you can find it starts with qemu-xxx, it might be wrapped inside Android Studio category), then click end task to kill the process.

danyfang
  • 3,251
  • 1
  • 15
  • 22
18

For Linux (should be similar for windows)


  • Locate your Sdk/emulator directory
  • Run ./emulator -list-avds
  • Note the AVD name form output eg. 'Pixel_2_API_30'
  • Run ./emulator @Pixel_2_API_30

This will try to launch the emulator with selected device and show errors if any, in my case it was a disk space issue since I was low on home space.

emulator: ERROR: Not enough space to create userdata partition. Available: 5084.121094 MB at /home/user/.android/avd/Pixel_2_API_30.avd, need 7372.800000 MB.

I had plenty of space in other partition/disk, so I changed the AVD location by setting environment variable 'ANDROID_AVD_HOME' to preferred location, post this started the Android Studio and using the AVD Manager recreated a Device, HTH.

Ravi
  • 329
  • 2
  • 7
  • This solution works for me to check how much space was I needing https://developer.android.com/studio/run/emulator-commandline#:~:text=The%20AVD%20data%20directory%2C%20also,android%2Favd%2F%20name%20. – Juan Velasquez Dec 16 '21 at 13:07
  • ERROR: process is translated under Rosetta. Attempting to replace emulator installation – Justin Dec 19 '21 at 19:39
12

This solved the same issue for me:

  1. Open text editor (eg. notepad)
  2. Type this code:
Vulkan=off
GLDirectMem=on
  1. Save the file as "advancedFeatures.ini" in .android directory. If your user is named Admin, under windows it would be: C:\Users\Admin\.android\advancedFeatures.ini.

  2. Run your app.

Sarthak Raval
  • 618
  • 1
  • 5
  • 21
7

After going through all answers.

This answer can help you finding the root cause. clear the below file and restart the device to know the problem

C:\Users\YourUserName\AppData\Local\Google\AndroidStudio2020.3\log\idea.log"

My problem came as

2021-10-13 19:11:54,776 [1564693]   INFO - manager.EmulatorProcessHandler - Emulator: init: Could not find wglGetExtensionsString! arbFound 0 listarbNull/empty 1 0 extFound 0 extNull/empty 1 0 remote 0 

On further search i found the this which points out changing advanced settings (Ram size) and Graphics configuration

Step 1 :- while setting up device click on advanced settings

enter image description here

Step 2 :- Change the 2 setting as highlighted. make it 512 and Automatic to Software GLES

enter image description here

Gaurav Khurana
  • 2,778
  • 1
  • 22
  • 28
6

I updated and had the same problem. I solved the problem by changing the Multicore CPU and memory

image description here

enzo
  • 9,121
  • 2
  • 12
  • 36
Julio
  • 69
  • 2
6

I faced the same issue. Fixed it by enabling the Hyper-V on my Windows 10 OS. I just typed Hyper in the Start menu and went to Turn Windows features on or off menu and ticked all the Hyper-V checkboxes like this:

enter image description here

ZygD
  • 10,844
  • 36
  • 65
  • 84
Nina
  • 61
  • 1
  • 3
  • Yes, enabling Hyper-V on my Windows 10 64-bit system stopped the "The emulator process for AVD" ... "has terminated" crashes for me too! I'm baffled, because instructions at https://developer.android.com/studio/run/emulator-acceleration indicate the exact opposite, namely that one should disable Hyper-V instead of enabling it. I had also tried HAXM v7.7.0 from https://github.com/intel/haxm/releases instead of the HAXM v7.6.5 that was in my \C:\Android\extras\intel\Hardware_Accelerated_Execution_Manager folder, but that did not work either, only enabling Hyper-V worked thus far. – seeingwithsound Sep 21 '21 at 21:29
6

To solve these type of issue, generally you haven't some file, that you need to download it from google and paste. I was facing the same issue. but after a lot of time spent on google finally I have got the solution.

Following are the steps:-

  1. Create virtual device using AVD Manager
  2. start the emulator
  3. if it is showing your emulator has terminated
  4. Then go to ("C:\Users\YourUserName\AppData\Local\Google\AndroidStudio2020.3\log\idea.log")
  5. check the issue by scroll down(on bottom you can check)
  6. If you are getting the same issue Check Emulator Error
  7. Then go to C:\Windows\System32 directory, search here for file called vulkan-1-999-0-0-0.dll
  8. If file is already in directory, then just rename the file into "vulkan-1.dll"
  9. else download the file from this link
  10. you will have zip file, just extract and paste the vulkan-1-999-0-0-0.dll file and perform the step 8.
Peter
  • 478
  • 5
  • 11
4

It's an issue of latest Emulator.

I upgraded to v30.6.4 last night and got the same issue.

Please use Genymotion instead before Android Studio Emulator issuing its next update.

It's free for personal use.

https://www.genymotion.com/download/

enter image description here

bhw1899
  • 77
  • 3
  • @IgorLevkivskiy can you explain how to downgrade emulator version? – basilkot May 03 '21 at 18:16
  • @basilkot find a download link of an older version and then replace android_sdk/emulator folder with the downloaded one. – Primož Ivančič May 03 '21 at 20:55
  • 1
    I can't find download link of an older version of emulator , I updated to latest which does not work , Can you please provide me with a download link of an older version of emualator ? – Waqas Tahir Jul 08 '21 at 10:44
  • 2
    I'm a little bit confused... so it's half a year and the main core feature of android studio doesn't work without any official fix? Am I missing something here? – Michael Chen Sep 05 '21 at 17:14
4

In case if anyone facing this issue. I solved it by:

  • Go to C:\Users\YourUserName\.android

  • Create a file named advancedFeatures.ini

  • Then add the following lines of code in the file:

     Vulkan = off
     GLDirectMem = on
    
Arun K Babu
  • 105
  • 1
  • 9
3

OK I fixed my problem like the one above by:

I removed the emulator in the AVD manager and reinstalled it. I also deleted the ANDROID_HOME environment variable and it worked again for me in Artic Fox

I am on the latest version of Android Studio Artic Fox 2020.3.1 Patch One on Windows 10 and I upgraded the emulator yesterday 8/18/21 and it completely broke functioning emulators.

3

My issue is resolved when I changed the CPU/ABI setting from "armeabi-v7a" to "x86_64".

enter image description here

halfer
  • 19,471
  • 17
  • 87
  • 173
  • Aren't arm emulators slower than x86_64? (it kind of sort of says so when you select arm while creating virtual device). I use MacBook Pro 2021, M1 Pro – Johnny Five Jan 23 '22 at 11:40
3

I would like to mention something about this,

The mentioned solutions works, however, if none works then please make sure you have sufficient space where AVDs are generated.

If system do not find the enough space to operate, it will give this error too, same as in my case.

If space is not an issue for you then mentioned other solutions must work.

  • One last thing... Take a look at the Event Log if the Issue is related with Vulkan download and install the Vulkan Runtime: https://vulkan.lunarg.com/ – zion Dec 27 '21 at 12:06
2

I Remove the Emulator folder from the SDK path and download the new component. It's working fine.

2

I face same kind of issues... After increase free space of machine its working fine...

Piyush
  • 1,060
  • 10
  • 20
2

This might sound like a joke but restart the computer maybe? I had some emulator processes hanging in the task manager. Restarted the computer and it worked. Maybe it is an android studio bug.

Numan Karaaslan
  • 1,268
  • 1
  • 15
  • 24
2

Was facing similar issue while launching arm64 emulator. I had enough disk space and tried uninstalling the emulator and reinstalling it. But this didn't help.

I was able to figure out the issue by running the below commands:

emulator -list-avds
emulator @NameOfAvd

This assumes you've emulator on the path. Executing the last command showed me the below errors which weren't visible when running from Android Studio:

[4453299712]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib
Could not launch '/Users/username/../emulator/qemu/darwin-x86_64/qemu-system-aarch64': No such file or directory

Executing the command emulator @NameOfAvd from the Android/sdk/tools path allowed me to start the arm64 AVD.

halfer
  • 19,471
  • 17
  • 87
  • 173
Mahendra Liya
  • 12,092
  • 11
  • 83
  • 106
1

I was not able to start API_30 devices.

I had to install the latest hardware accelerator version (HAXM v7.7.0) from https://github.com/intel/haxm

Then

Sebastian
  • 43
  • 5
  • Fingers crossed, but upgrading to the latest HAXM v7.7.0 seemed to be the trick for me. So far so good. AVD crashed again the first load but now is loading on the fresh boot. – drewid Nov 15 '21 at 01:23
1

After having tested solutions suggested in this forum, the only one which solved the problem to me is to free space in my hard disk. In my case I needed at least 7 GB to make it work.

1

enter image description hereIn my case, lowering the API version to 28 for System Image x86 helped when creating new Virtual Device.

redballtoy
  • 21
  • 4
1

In my MacbookPro M1 Pro, The issue was I had selected the x86 image while creating the emulator device.

Changing this setting and using the image from the recommended images resolved my issue.

1

I select configuration of the emulator graphics "Hardware-GLES 2.0", it worked

1
  1. Open "Edit this AVD".
  2. In the section "Emulator Performance" change Graphic type to another (for example, Software - GLES 1.1).

I have an old video card and this is work in my case.

kirkadev
  • 302
  • 3
  • 9
1

If emulator is terminating and it was properly running earlier and even if you have enough disk space. You can delete and create a new Virtual device which is almost same as "Wipe Data" action on existing Emulator. But if you do not want to wipe data and loose any kind of progress made on the Emulator, There is a "Cold Boot" option for you which helps. It actually solved the problem for me.

Suresh Chaudhari
  • 528
  • 8
  • 19
1

For those who running flutter/Dart in android studio. Here are the step on how I solved this:

  1. Go to any of your current device in Device manager.
  2. Click the edit icon (Pen Icon). Then dialog for edit will open.
  3. Now change the "Graphics" property in the AVD under Emulated Performance from automatic to "Software-GLES 2.0". it works for me.

Note: Am using android studio Bumblebee | 2021.1.1 patch 2

Jimmy
  • 39
  • 1
  • 9
0

I had the same problem when I upgraded the Emulator, the solution that worked for me is: -updating windows -and remove all the AVDs then I installed a new one.(release name:Pie,

0

Really, I had same issue. I had tried over 10 times..im not professor but I found finally. It was a tough time for me.

Try again follow next.

If you install Android again again, I think import setting has problem. wrong Path on android screen. not environment Path Because automatically it is determined old path(when it installed first)

and Choose a lower API if possible in my case, when I use API 17, the emulator acted. but API 30, The emulator has terminated...so, I think if you use windows 7 or low spec, use low API environment. In addition, I needed installing emulator-windows_x64-7491168,zip (In my case)

enter image description here

enter image description here

Majid Hajibaba
  • 2,834
  • 6
  • 19
  • 46
0

I just restarted my machine and it worked. And yea! I agree with anatolii-shuba’s answer with the main cause been as a result of lack of free space on your disk

  • 3
    Please don't add "I agree with" as answers. They don't actually provide an answer to the question, and can be perceived as noise by its future visitors. Once you [earn](https://meta.stackexchange.com/questions/146472/what-is-the-best-way-to-increase-my-reputation-and-privileges) enough [reputation](https://stackoverflow.com/help/whats-reputation), you will gain privileges to [upvote answers](https://stackoverflow.com/help/privileges/vote-up) you like. This way future visitors of the question will see a higher vote count on that answer. – Tyler2P Aug 18 '21 at 10:20
0

I solved this by clearing data of the emulator, and then restart the emulator. Finally the emulator has not terminate when launched

0

It's an issue of latest Emulator .

I upgraded to v30.6.4 last night and got the same issue.

Team fixed issue and released new version do update it , https://i.stack.imgur.com/mXYJs.png

well its working now

0

I had to remove the Android Emulator and reinstall it. Also I freed up some space to get it to work!

0

The simple solution was to free up some space from the hard-disk
In my case, only 2gb space was available in the hard-disk.
I made some space by emptying the bin, and now available space was 22gb.

Then I just started the emulator normally ( didn't uninstall or deleted anything) and it started.

Akshay Chopra
  • 659
  • 8
  • 10
0

For me unchecking the "Multi-Core CPU" option in the virtual device configuration did the job. It is listed under "Advanced Settings".

MrMois
  • 1
0

I had the same issue. From the logs, the error code pointed to a lack of space for creating userdata. So, deleting caches of previously deleted VDs did the job for me. Go to C:\Users\user.android\avd and delete any unused files.

0

In my case, this happened when I tried to start a second Virtual Device (VD). I was able to resolve the issue by, simply, closing the currently running VD. Once I did this, I was able to run multiple VDs.

Bink
  • 1,524
  • 1
  • 19
  • 34
0

this is how I solved this issue. I created an AVD with API 28 [ Non google play version] . Choose x86 64 version. Increase the RAM size of AVD to 2 GB Choose Graphic - Hardware GLES 2.0

with this i could able to launch the the AVD and it is much faster than previous one

Dharman
  • 26,923
  • 21
  • 73
  • 125
0

For myself, I had a mismatch in my $ANDROID_HOME envvar.

It was pointed to an old location before I had downloaded Android Studio. Updated to $HOME/Library/Android/sdk and we are good.

ether_joe
  • 968
  • 13
  • 25
0

I had the same issue and i had tried all the above solution but couldn't succeed. finally i have got rid of this issue in my HP PC by uninstalling the pre installed program hp wolf security.

Linendra Soni
  • 162
  • 1
  • 10
0

In my case, i solved it by delete existing AVD and create new one.

amerw
  • 115
  • 9
0

To me, the solution was executing the VulkanRT-Installer.exe

0

android studio has issue with special characters where the issue could be due to the mapping where the emulator runs. I had this problem where I was running on my C:/User that had 'ã' and with that the same error occurred. To fix change the Windows environment variable 'ANDROID_USER_HOME' to a folder with a common name for example C:\Android\sdk

Lucas Souza
  • 51
  • 1
  • 4
0

I had this issue, running Android Studio Bumblebee 2021.1.1 on Ubuntu 20.04.3 LTS.

Issue in my case was a mismatch between NVideo kernel module and NVideo client libraries, as noted from dmesg output (these log entries appeared each time an AVD was restarted and failed):

NVRM: API mismatch: the client has the version 470.103.01, but
NVRM: this kernel module has the version 470.86.  Please                           
NVRM: make sure that this kernel module and all NVIDIA driver                           
NVRM: components have the same version.

Solution in my case was to upgrade the NVidia drivers to package nvidia-driver-510 using the Additional Drivers dialog of Ubuntu. Then reboot.

Darren Smith
  • 1,966
  • 14
  • 14
0

change the "Graphics" property in the AVD,choose "Soft ware --Gles2.0". it works for me.

YJ.XU
  • 11
  • 4
0

Short story long

I came into this issue two weeks ago on Windows 11. I haven't performed anything special with my setup over the weekend. But on Monday I could not run emulator. I tried Updating/Reinstalling Android Studio and it's modules via SDK manager. Nothing helped.

In C:\Users<User>\AppData\Local\Google\AndroidStudio2021.1\log\idea.log I found some issues with Vulkan during emulator starting.

What helped

Updating Windows and Nvidia drivers to latest version. @Darren Smith fixed this issue for Ubuntu by updating Nvidia drivers too. If it won't help you can at least enjoy latest bugs for your hardware...

0

I solved the problem by updating Android Emulator and Intel x86 Emulator Accelerator (HAXM installer) version in Android Studio. Both these components were outdated after update of android studio.

0

In my case the problem happened on a MacBook Pro with an Apple silicon CPU (m1, arm64), because I've migrated the Android Studio and Android SDK from an older MacBook Pro with Intel CPU. I've re-installed the ARM version of Android Studio then and updated the Android SDK, but seems that Intel emulator version persisted. The solution was just uninstall and reinstall the Android Emulator:

Tools -> SDK Manager -> SDK Tools tab

Anton Malyshev
  • 8,378
  • 2
  • 25
  • 44
0

goto avd folder

delete all avd's

and relaunch avd

hope you will find avd working fine

sherkhan
  • 453
  • 4
  • 6
0
  1. Go to Device Manager on Android Studio

  2. Click Drop Menu on Action Panel

  3. click Wipe Data

  4. Launch your AVD Manage Again OR Restart Your computer

Sarthak Raval
  • 618
  • 1
  • 5
  • 21
-1

Go to Task Manager using (Ctrl+Alt+Delete) and check in background processes that emulator is not running in background. If it is running in background, end task and try to start your emulator again.

Ahmad hassan
  • 295
  • 5