android-studioandroid-emulatorwindows-10

Android Studio: Emulator terminated with exit code -1073741515


OS: Microsoft Windows 22H2 19045
Android Studio Version: Giraffe 2022.3.1 Patch 2
Free space available: 200gb

Problem Description: The emulator process for AVD Pixel_5_API_34 has terminated

Log file:

2023-10-08 12:29:50,832 [  51315] SEVERE - Emulator: Pixel_3a_API_34_extension_level_7_x86_64 - Emulator terminated with exit code -1073741515
java.lang.Throwable: Emulator terminated with exit code -1073741515
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202)
    at com.android.tools.idea.avdmanager.EmulatorProcessHandler$ConsoleListener.onTextAvailable(EmulatorProcessHandler.kt:89)
    at jdk.internal.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at com.intellij.execution.process.ProcessHandler$2.invoke(ProcessHandler.java:248)
    at jdk.proxy1/jdk.proxy1.$Proxy44.onTextAvailable(Unknown Source)
    at com.intellij.execution.process.ProcessHandler.notifyTextAvailable(ProcessHandler.java:222)
    at com.intellij.execution.process.ProcessTerminatedListener.processTerminated(ProcessTerminatedListener.java:54)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at com.intellij.execution.process.ProcessHandler$2.invoke(ProcessHandler.java:248)
    at jdk.proxy1/jdk.proxy1.$Proxy44.processTerminated(Unknown Source)
    at com.intellij.execution.process.ProcessHandler.lambda$notifyTerminated$2(ProcessHandler.java:206)
    at com.intellij.execution.process.ProcessHandler$TasksRunner.execute(ProcessHandler.java:281)
    at com.intellij.execution.process.ProcessHandler.notifyTerminated(ProcessHandler.java:189)
    at com.intellij.execution.process.ProcessHandler.notifyProcessTerminated(ProcessHandler.java:185)
    at com.intellij.execution.process.BaseProcessHandler.onOSProcessTerminated(BaseProcessHandler.java:61)
    at com.intellij.execution.process.BaseOSProcessHandler$1.lambda$startNotified$0(BaseOSProcessHandler.java:98)
    at com.intellij.execution.process.ProcessWaitFor.lambda$new$0(ProcessWaitFor.java:45)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
    at com.intellij.execution.process.ProcessWaitFor.lambda$new$1(ProcessWaitFor.java:23)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:833)
2023-10-08 12:29:50,835 [  51318] SEVERE - Emulator: Pixel_3a_API_34_extension_level_7_x86_64 - Android Studio Giraffe | 2022.3.1 Patch 2  Build #AI-223.8836.35.2231.10811636
2023-10-08 12:29:50,835 [  51318] SEVERE - Emulator: Pixel_3a_API_34_extension_level_7_x86_64 - JDK: 17.0.6; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2023-10-08 12:29:50,835 [  51318] SEVERE - Emulator: Pixel_3a_API_34_extension_level_7_x86_64 - OS: Windows 10
2023-10-08 12:29:51,120 [  51603]   INFO - #com.android.sdklib.internal.avd.AvdManager - C:\Users\amanj\.android\avd\Pixel_3a_API_34_extension_level_7_x86_64.avd\hardware-qemu.ini.lock\pid not found for Pixel_3a_API_34_extension_level_7_x86_64
2023-10-08 12:29:51,120 [  51603]   INFO - #com.android.sdklib.internal.avd.AvdManager - C:\Users\amanj\.android\avd\Pixel_3a_API_34_extension_level_7_x86_64.avd\userdata-qemu.img.lock\pid not found for Pixel_3a_API_34_extension_level_7_x86_64
2023-10-08 12:29:51,120 [  51603]   WARN - #com.android.tools.idea.avdmanager.AvdManagerConnection - Unable to determine if Pixel_3a_API_34_extension_level_7_x86_64 is online, assuming it's not
2023-10-08 12:29:53,643 [  54126]   INFO - Emulator: Pixel_3a_API_34_extension_level_7_x86_64 - D:\Softwares\AndroidSDK\emulator\emulator.exe -netdelay none -netspeed full -avd Pixel_3a_API_34_extension_level_7_x86_64 -qt-hide-window -grpc-use-token -idle-grpc-timeout 300
2023-10-08 12:29:53,673 [  54156]   INFO - Emulator: Pixel_3a_API_34_extension_level_7_x86_64 - Android emulator version 32.1.15.0 (build_id 10696886) (CL:N/A)
2023-10-08 12:29:53,673 [  54156]   INFO - Emulator: Pixel_3a_API_34_extension_level_7_x86_64 - Found systemPath D:\Softwares\AndroidSDK\system-images\android-34\google_apis\x86_64\
2023-10-08 12:29:53,844 [  54327]   INFO - Emulator: Pixel_3a_API_34_extension_level_7_x86_64 - Process finished with exit code -1073741515 (0xC0000135)
2023-10-08 12:29:54,674 [  55157]   INFO - #com.android.sdklib.internal.avd.AvdManager - C:\Users\amanj\.android\avd\Pixel_3a_API_34_extension_level_7_x86_64.avd\hardware-qemu.ini.lock\pid not found for Pixel_3a_API_34_extension_level_7_x86_64
2023-10-08 12:29:54,674 [  55157]   INFO - #com.android.sdklib.internal.avd.AvdManager - C:\Users\amanj\.android\avd\Pixel_3a_API_34_extension_level_7_x86_64.avd\userdata-qemu.img.lock\pid not found for Pixel_3a_API_34_extension_level_7_x86_64
2023-10-08 12:29:54,674 [  55157]   WARN - #com.android.tools.idea.avdmanager.AvdManagerConnection - Unable to determine if Pixel_3a_API_34_extension_level_7_x86_64 is online, assuming it's not
2023-10-08 12:30:02,659 [  63142]   INFO - #c.i.u.MemTester - not supported: Windows is not supported
2023-10-08 12:30:08,642 [  69125]   INFO - #c.i.c.ComponentStoreImpl - Saving appFileTypeManager took 19 ms
2023-10-08 12:30:08,835 [  69318]   WARN - #c.i.u.x.Binding - no accessors for org.jetbrains.kotlin.idea.projectConfiguration.KotlinNotConfiguredSuppressedModulesState
2023-10-08 12:30:08,838 [  69321]   INFO - #c.i.c.ComponentStoreImpl - Saving Project(name=currencies, containerState=COMPONENT_CREATED, componentStore=D:\aman2000\Documents\Android Projects\currencies)RunManager took 28 ms

Steps I have already tried to fix this issue:
1.) Deleting and creating new virtual devices
2.) Re-install emulator from SDK tools
3.) Re-install Android Studio
4.) Toggling Hyper-V in Windows features


Solution

  • Installing the Media Feature Pack solved this issue for me. To install it follow these steps:

    1.) Type Apps & Features in start search box
    2.) Go to apps and features
    3.) Go to optional features
    4.) Add a feature
    5.) Search for "Media Feature Pack"
    6.) Install it
    7.) Restart your computer