Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

The Android emulator panics because it cannot find the AVD system path

ErrorThe emulator stops with a PANIC message about the AVD system path or the SDK root variable

Short 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.

  • Applies to Android Emulator 36.x, Android Studio current stable, Windows 11, macOS 26, Ubuntu 24.04
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 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 -verbose
  2. 2Match what you see, then jump to its fix

    1. 1The 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. 2The 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. 3emulator -list-avds prints nothing, although Device Manager shows AVDs.ANDROID_AVD_HOME or ANDROID_USER_HOME points somewhere elseFix

What does the error look like?

  • The emulator stops with a PANIC message about the AVD system path or the SDK root variable
  • emulator -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_ROOT

2Fix

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-tools

3Verify

The emulator lists your AVDs without a panic.

emulator -list-avds

Confirmed by developer.android.com

Did this fix it?

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_35

Confirmed by developer.android.com

Did this fix it?

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_HOME

2Fix

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_HOME

3Verify

Your AVD names appear.

emulator -list-avds

Confirmed by developer.android.com

Did this fix it?

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 fix

Mobile 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 fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.