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.
I deleted my emulator (also I cleared inside of directory: /.android/avd/) and created a new one again I updated the HAXM installer to version 7.6.5 I tried to run an emulator with lower APIs but...
Image of the error:
https://i.stack.imgur.com/vU9N0.png
The main root cause of that issue is lack of free space on your disk
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.
Follow below steps to solve the issue:
Go to Tools -> SDK Manager In SDK Manager Go To SDK Tools Tab and untick the Android Emulator and click on Apply. This step will uninstall the Android Emulator.
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. After successful installation. Restart Android Studio. Create new emulator device and Run it. This should work.
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.
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.
This solved the same issue for me:
Open text editor (eg. notepad) Type this code:
Vulkan=off
GLDirectMem=on
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. Run your app.
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
https://i.stack.imgur.com/aTENu.png
Step 2 :- Change the 2 setting as highlighted. make it 512 and Automatic to Software GLES
https://i.stack.imgur.com/ZeLqn.png
I updated and had the same problem. I solved the problem by changing the Multicore CPU and memory
https://i.stack.imgur.com/5dEaJ.png
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:
https://i.stack.imgur.com/nqNU5.png
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:-
Create virtual device using AVD Manager start the emulator if it is showing your emulator has terminated Then go to ("C:\Users\YourUserName\AppData\Local\Google\AndroidStudio2020.3\log\idea.log") check the issue by scroll down(on bottom you can check) If you are getting the same issue Then go to C:\Windows\System32 directory, search here for file called vulkan-1-999-0-0-0.dll If file is already in directory, then just rename the file into "vulkan-1.dll" else download the file from this link you will have zip file, just extract and paste the vulkan-1-999-0-0-0.dll file and perform the step 8.
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/
https://i.stack.imgur.com/wl6QI.png
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.
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.
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
My issue is resolved when I changed the CPU/ABI setting from "armeabi-v7a" to "x86_64".
https://i.stack.imgur.com/e4a2V.png
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.
I Remove the Emulator folder from the SDK path and download the new component. It's working fine.
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.
I face same kind of issues... After increase free space of machine its working fine...
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.
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
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.
https://i.stack.imgur.com/B9dh6.jpg
I select configuration of the emulator graphics "Hardware-GLES 2.0", it worked
Open "Edit this AVD". 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.
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.
For those who running flutter/Dart in android studio. Here are the step on how I solved this:
Go to any of your current device in Device manager. Click the edit icon (Pen Icon). Then dialog for edit will open. 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
Check if your disk space of computer is full or not. In my case C:// was full
This error also occurs when there is not enough free space
left on your computer. be sure to free up some more space.
$ emulator -avd phone2
ERROR | Not enough disk space to run AVD 'phone2'. Exiting...
In Windows, open the Task Manager and kill the process "qemu-system"
Success story sharing