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?