The Android emulator panics because it cannot find the AVD system path
The emulator stops with a PANIC message about the AVD system path or the SDK root variableShort answer
The emulator reads system images from the system-images folder of your Android SDK and AVD files from the avd folder in your Android home. The panic means it did not find one of them. Set ANDROID_HOME to the real SDK folder, install the system image for the AVD, and check the AVD folder variables.
Fix it fast
1Find out which cause you have
Run the emulator with verbose output and list the AVDs it can see. The output shows which folders it chose.
emulator -list-avds emulator -avd Pixel_8_API_35 -verbose2Match what you see, then jump to its fix
- 1
The panic appears when the emulator starts from a terminal or CI job, but not from Android Studio.ANDROID_HOME is not set, or it points at the wrong folderFix - 2
The AVD is listed, but starting it panics; the system-images folder has no folder for its API level.The system image for the AVD is not installed in this SDKFix - 3
emulator -list-avds prints nothing, although Device Manager shows AVDs.ANDROID_AVD_HOME or ANDROID_USER_HOME points somewhere elseFix
- 1
What does the error look like?
The emulator stops with a PANIC message about the AVD system path or the SDK root variableemulator -list-avds prints no AVDs although Device Manager shows them
Cause 1 of 3
ANDROID_HOME is not set, or it points at the wrong folder
1Check
ANDROID_HOME names the SDK folder. ANDROID_SDK_ROOT is deprecated, and Studio checks that the old and new names agree, so a stale ANDROID_SDK_ROOT can cause trouble.
echo $ANDROID_HOME
echo $ANDROID_SDK_ROOT2Fix
Set ANDROID_HOME to the SDK folder shown in SDK Manager, make ANDROID_SDK_ROOT match it or remove it, and open a new terminal. On Windows, set the same variable in system settings.
export ANDROID_HOME=~/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools3Verify
The emulator lists your AVDs without a panic.
emulator -list-avdsConfirmed by developer.android.com
Cause 2 of 3
The system image for the AVD is not installed in this SDK
1Check
Each AVD needs files from sdk/system-images/android-<api>/<variant>/<arch>/. A reinstall or a new SDK folder leaves AVDs behind with their images gone.
ls $ANDROID_HOME/system-images/2Fix
Install the matching system image in SDK Manager (SDK Platforms tab, Show Package Details) or recreate the AVD in Device Manager.
sdkmanager --list
sdkmanager "<system-images package path copied from the list>"3Verify
Start the AVD again.
emulator -avd Pixel_8_API_35Confirmed by developer.android.com
Cause 3 of 3
ANDROID_AVD_HOME or ANDROID_USER_HOME points somewhere else
1Check
The emulator searches ANDROID_AVD_HOME first, then ANDROID_USER_HOME/avd, then $HOME/.android/avd. A variable left over from an old setup hides the real folder.
echo $ANDROID_AVD_HOME
echo $ANDROID_USER_HOME2Fix
Remove the variables you do not need, or point them at the folder that really holds your .avd directories.
unset ANDROID_AVD_HOME ANDROID_USER_HOME3Verify
Your AVD names appear.
emulator -list-avdsConfirmed by developer.android.com
How do I stop it coming back?
- Define ANDROID_HOME once, in system or shell settings, and let every tool read it.
- After moving or reinstalling the SDK, recreate AVDs or reinstall their system images.
- Do not keep a second copy of the emulator outside the SDK folder.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Mobile apps
Gradle cannot find the Android SDK on this machine
FAILURE: Build failed with an exception. What went wrong: SDK location not found.
Gradle looks for the Android SDK in the sdk.dir line of android/local.properties and in the ANDROID_HOME environment variable, and found neither.
4 causes, each with a fixMobile apps
adb cannot start because something already holds its port
adb start-server failed
The adb server must bind local TCP port 5037, and every adb client talks to it there.
2 causes, each with a fixMobile apps
adb cannot connect to its daemon or start the server
* daemon started successfully *
The adb server is a background process on your computer that listens on TCP port 5037.
2 causes, each with a fixMobile apps
adb prints 'server version doesn't match this client; killing...'
adb server version doesn't match this client; killing...
adb runs a background server, and every adb command is a client.
3 causes, each with a fixMobile apps
adb tcpip 5555 fails because no device is found
adb: more than one device/emulator
adb tcpip only works while the device is attached and listed by adb, because it tells the phone to start listening on port 5555.
4 causes, each with a fixMobile apps
The Android Emulator says /dev/kvm is not found
KVM acceleration can NOT be used
The emulator wants a hypervisor and cannot find one.
4 causes, each with a fix