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!
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.
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.
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With