• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

AVD Will not start (MacBook)

I have installed Android Studio 3.3.2 on my Macbook (MoJave 10.14.3), but cannot get the AVD device emulator to work with the following error:

06:43 Emulator: emulator: ERROR: Unknown AVD name [Pixel_XL_API_28], use -list-avds to see valid list.

06:43 Emulator: Process finished with exit code 1​

I found the Pixel_XL_API_28.ini and Pixel_XL_API_28.avd in the "/private/var/root/.android/avd" folder and the following paths have been added to bash_profile (as below)

export ANDROID_HOME=/Users/brendonshaw/
export ANDROID_SDK_ROOT=/Users/brendonshaw/Library/Android/sdk
export ANDROID_SDK_HOME=/Users/brendonshaw/Library/Android/sdk
export ANDROID_AVD_HOME=/private/var/root/.android/avd

export PATH=${PATH}:$ANDROID_HOME:$ANDROID_HOME:$ANDROID_AVD_HOME:$ANDROID_SDK_ROOT:$ANROID_SDK_HOME
If I run the emulator from the command line

./emulator -avd Pixel_XL_API_28.ini --target="AVD name"​

I receive the following error message:

emulator: ERROR: Unknown AVD name [Pixel_XL_API_28.ini], use -list-avds to see valid list.

ANDROID_AVD_HOME is defined but there is no file Pixel_XL_API_28.ini.ini in $ANDROID_AVD_HOME

(Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/avd and $HOME/.android/avd)​

Is there any way to fix this problem or change the directory to point to somewhere else to find the appropriate files?
 
Try managing and running the emulator from within Android Studio, rather than the command line.
I never run mine independently, and launch everything from AS. It provides an AVD management tool, in which you can create AVDs with the desired API level.
 
Thank you for the quick response, I have tried to start AVD from Android Studio, but I get the following error message:

07:26 Emulator: PANIC: Unknown AVD name [New_Device_API_28], use -list-avds to see valid list.

07:26 Emulator: HOME is defined but there is no file New_Device_API_28.ini in $HOME/.android/avd

07:26 Emulator: (Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/avd, and $HOME/.android/avd)

07:26 Emulator: Process finished with exit code 1
 
Answ
I have installed Android Studio 3.3.2 on my Macbook (MoJave 10.14.3), but cannot get the AVD device emulator to work with the following error:

06:43 Emulator: emulator: ERROR: Unknown AVD name [Pixel_XL_API_28], use -list-avds to see valid list.

06:43 Emulator: Process finished with exit code 1​

I found the Pixel_XL_API_28.ini and Pixel_XL_API_28.avd in the "/private/var/root/.android/avd" folder and the following paths have been added to bash_profile (as below)

export ANDROID_HOME=/Users/brendonshaw/
export ANDROID_SDK_ROOT=/Users/brendonshaw/Library/Android/sdk
export ANDROID_SDK_HOME=/Users/brendonshaw/Library/Android/sdk
export ANDROID_AVD_HOME=/private/var/root/.android/avd

export PATH=${PATH}:$ANDROID_HOME:$ANDROID_HOME:$ANDROID_AVD_HOME:$ANDROID_SDK_ROOT:$ANROID_SDK_HOME
If I run the emulator from the command line

./emulator -avd Pixel_XL_API_28.ini --target="AVD name"​

I receive the following error message:

emulator: ERROR: Unknown AVD name [Pixel_XL_API_28.ini], use -list-avds to see valid list.

ANDROID_AVD_HOME is defined but there is no file Pixel_XL_API_28.ini.ini in $ANDROID_AVD_HOME

(Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/avd and $HOME/.android/avd)​

Is there any way to fix this problem or change the directory to point to somewhere else to find the appropriate files?
AnswEr to this will even help me as I'm looking for a similar solution
 
I have the same problem with any virtual device, I am sure the paths are wrong. Is there any chance some one could send me a copy of they paths, is there a missing path?

export ANDROID_HOME=
export ANDROID_SDK_ROOT=
export ANDROID_SDK_HOME=
export ANDROID_AVD_HOME=
 
Sounds like an installing problem with Android Studio. This should just work straight out of the box and you shouldn't need to be messing with environment variables like PATH.
If you're getting issues like this, there may be other troubles. I would try a re-install.
 
I have tried re-installing several times, I think you are right the installation is screwed up from previous installs but just figure out what is going on with the paths as it seems to pointing to the right folder for the .ini & .avd files.
 
As a quick update, I found the permissions for the folder "/private/var/root/.android/avd" need to be set to admin. Now running the command line I get the following error:

emulator: ERROR: A snapshot operation for 'Nexus_5X_API_Q' is pending and timeout has expired. Exiting...
 
Mate you should nuke the entire installation (including .AndroidStudio3.3) and do a clean install. These problems should not occur in a properly installed instance of Android Studio.
 
In the end up, wiped my MacBook and re-installed everything and now the phone emulation fully works. I think the problem was an old Mac Book o/s and the initial Android Studio installation failed and just a complete mess.

Many thanks for everyone's help and support.
 
Back
Top Bottom