Reputation: 11
I am a beginner working with Android Studio and am encountering an issue when attempting to launch an emulator. Despite multiple troubleshooting attempts—including reinstalling Android Studio across different versions, restarting my PC, performing cold boots, wiping the emulator's data, and creating emulators for multiple devices with different API levels—the same error consistently occurs, regardless of the emulator configuration.
Error while trying to start-up the emulator: Error during emulator starting-up
The error log in C:\Users{user_name}\AppData\Local\Google\AndroidStudio{version}\log\idea.txt shows the following entries:
2024-11-13 10:54:06,796 [ 14130] INFO - Emulator: Pixel 3a - Process finished with exit code -1073741819 (0xC0000005)
2024-11-13 10:54:06,796 [ 14130] WARN - Emulator: Pixel 3a - Emulator terminated with exit code -1073741819
It appears the emulator process is terminating unexpectedly with exit code -1073741819 (0xC0000005). My device has adequate storage space.
Could anyone provide guidance on resolving this error?
TRIED:
EXPECTED:
ACTUALLY RESULTED:
UPDATE: Running emulator as ```PS C:\Users\{user_name}\AppData\Local\Android\Sdk\emulator> ./emulator -gpu off -avd Pixel_3a``` runs the emulator but won't open up directly through android studio, which is the main problem for me. Also, additional information if required, the graphics acceleration is set to automatic by default and is grayed out ( I can't change it). If other options is set to gpu like host, then it will crash like:
PS C:\Users\{user_name}\Desktop> C:\Users\{user_name}\AppData\Local\Android\Sdk\emulator/emulator -gpu host -avd Pixel_3a
INFO | Android emulator version 35.4.1.0 (build_id 12623485) (CL:N/A)
INFO | Graphics backend: gfxstream
INFO | Found systemPath C:\Users\{user_name}\AppData\Local\Android\Sdk\system-images\android-30\google_apis_playstore\x86\
INFO | Found systemPath C:\Users\{user_name}\AppData\Local\Android\Sdk\system-images\android-30\google_apis_playstore\x86\
WARNING | Please update the emulator to one that supports the feature(s): Vulkan
INFO | IPv4 server found: ....
INFO | Ignore IPv6 address: ....
INFO | Ignore IPv6 address: ....
INFO | Checking system compatibility:
INFO | Checking: hasSufficientDiskSpace
INFO | Ok: Disk space requirements to run avd: `Pixel_3a` are met
INFO | Checking: hasSufficientHwGpu
INFO | Ok: Hardware GPU requirements to run avd: `Pixel_3a` are passed
INFO | Checking: hasSufficientSystem
INFO | Ok: System requirements to run avd: `Pixel_3a` are met
WARNING | FeatureControl is requesting a non existing feature.
INFO | Warning:
INFO | Warning:
INFO | Storing crashdata in: C:\Users\{user_name}\AppData\Local\Temp\\AndroidEmulator\emu-crash-35.4.1.db, detection is enabled for process: 8128
INFO | Crash reports will be automatically uploaded to: https://clients2.google.com/cr/report
library_mode host gpu mode host
PS C:\Users\{user_name}\Desktop>
I have vulkan-1.dll file in both path C:\Windows\System32 and *{ANDROID_HOME}\emulator\lib64* as stated here.
Upvotes: 1
Views: 313
Reputation: 1
Try these solutions in order, as they progress from simple to more complex fixes:
# Run emulator with GPU off
cd %ANDROID_HOME%/emulator
./emulator -gpu off -avd YOUR_AVD_NAME
Or modify the AVD configuration:
Control Panel → 3D Settings → Program Settings
Add Android Emulator and set:
- OpenGL rendering: Force software
- Power management: Prefer maximum performance
# Add these to System Variables
ANDROID_HOME=C:\Users\[username]\AppData\Local\Android\Sdk
JAVA_HOME=C:\Program Files\Microsoft\jdk-17.0.8.7-hotspot\
Path=%Path%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\emulator
# Windows PowerShell commands
Remove-Item -Recurse -Force "${env:USERPROFILE}\.android\avd\*"
Remove-Item -Recurse -Force "${env:LOCALAPPDATA}\Android\Sdk\system-images\*"
# Reinstall system images
sdkmanager --install "system-images;android-30;google_apis_playstore;x86"
# Create AVD via command line with optimal settings
avdmanager create avd -n "Pixel_3a_API_30" \
-k "system-images;android-30;google_apis_playstore;x86" \
-d "pixel_3a" \
--force
# Edit config.ini
notepad %USERPROFILE%\.android\avd\Pixel_3a_API_30.avd\config.ini
Add these lines to config.ini:
hw.gpu.enabled=yes
hw.gpu.mode=off
disk.dataPartition.size=6442450944
Edit studio64.exe.vmoptions
:
# Location: %APPDATA%\Google\AndroidStudio[version]\studio64.exe.vmoptions
-Xmx2048m
-XX:MaxPermSize=512m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
# Uninstall existing HAXM
cd %ANDROID_HOME%\extras\intel\Hardware_Accelerated_Execution_Manager
silent_install.bat -u
# Download latest HAXM
# Install with custom settings
silent_install.bat -log -m 2048
# PowerShell (Admin)
# Enable Hyper-V
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
# OR Disable if using HAXM
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
# Check Vulkan installation
Get-ChildItem -Path C:\Windows\System32\vulkan* -File
Get-ChildItem -Path C:\Windows\SysWOW64\vulkan* -File
If missing:
C:\VulkanSDK\[version]\Bin
# Clean Android Studio
File → Invalidate Caches / Restart
# Update SDK Tools
sdkmanager --update
<!-- In gradle.properties -->
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m
org.gradle.parallel=true
org.gradle.daemon=true
# Check emulator process
tasklist | findstr "qemu"
# Monitor GPU usage
nvidia-smi -l 1
If issues persist:
# PowerShell
systeminfo | Select-String "Total Physical Memory","Processor","OS Name"
# Command Prompt (Admin)
systeminfo | findstr /i "Virtualization"
# Check emulator logs
type %USERPROFILE%\.android\avd\*.log
# Remove Android Studio completely
Remove-Item -Recurse -Force "${env:LOCALAPPDATA}\Google\AndroidStudio*"
Remove-Item -Recurse -Force "${env:APPDATA}\Google\AndroidStudio*"
Remember to:
Would you like me to explain any specific part in more detail?
Upvotes: 0