Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown AVD name, use -list-avds to see valid list

Tags:

android

sdk

I'm trying to setup an Android Emulator in order to use Cordova. I installed everything I need, the Android SDK Tools (25.2.5), Android SDK Build-tools (25.*) and Android SDK Platform-tools, along with every packet under Android 7.1.1 (API 25). I then go to andoird avd and choose to create an AVD based on one of the templates (google nexus 5) with the default name (AVD_for_Nexus_5_by_Google). However, when i go run it on "Android Virtual Devices", i get the error message:

"Starting emulator for AVD 'AVD_for_Nexus_5_by_Google' PANIC: Unknown AVD name [AVD_for_Nexus_5_by_Google], use -list-avds to see valid list. HOME is defined but could not find AVD_for_Nexus_5_by_Google.ini file in $HOME/.android/avd (Note: avd is searched in the order of $ANDROID_AVD_HOME,$ANDROID_SDK_HOME/.android/avd and $HOME/.android/avd)"

If i just have created it, why doesn't it show up? When i do "emulator -list-avds", nothing shows up. And when i do an "ls /root/.android/avd" on , i can see both files: "AVD_for_Nexus_5_by_Google.avd AVD_for_Nexus_5_by_Google.ini"

Thanks!

like image 484
Percy Avatar asked Feb 24 '17 00:02

Percy


People also ask

What is the AVD name?

An Android Virtual Device (AVD) is a configuration that defines the characteristics of an Android phone, tablet, Wear OS, Android TV, or Automotive OS device that you want to simulate in the Android Emulator.

What is an AVD What do you use it for?

You use the Android Device Manager to create and configure Android Virtual Devices (AVDs) that run in the Android Emulator. Each AVD is an emulator configuration that simulates a physical Android device.


1 Answers

The problem was that i hadn't defined the env variables. To fix this put this lines in a text file (modify the directories accordingly):

export ANDROID_HOME=/root/Android/Sdk/ export PATH=${PATH}:/root/Android/Sdk/tools/ export ANDROID_AVD_HOME=/root/.android/avd/

And then do a "source /textfile" in the terminal you're using. If you're not sure which directory's storing your avd, do a "updatedb && locate *.avd"

like image 75
Percy Avatar answered Sep 18 '22 00:09

Percy