Android Emulator issues in new versions - The emulator process has terminated
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.
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.
I hope this process work for you as well.