I had before in my machine running Windows 10, then I decided to switch back again to Arch Linux. Before installing Arch Linux I backed up my hidden Android directory that has AVD data directory which is located in:
C:\Users\Khalid\.android
After switching to Arch, I installed android emulator on it and added all the the required environment variables by the android emulator to .bashrc, these are the environment variables defined:
export EXTERNAL_DRIVE=/run/media/user12/EXTERN_DRIVE/Android
export ANDROID_HOME=/opt/android-sdk
export ANDROID_EMULATOR=$ANDROID_HOME/emulator
export ANDROID_EMULATOR_HOME=$EXTERNAL_DRIVE/.android/
export ANDROID_AVD_HOME=$ANDROID_EMULATOR_HOME/avd/
export ANDROID_TOOLS=$ANDROID_HOME/cmdline-tools/tools
export ANDROID_CMDLINE_TOOLS=$ANDROID_HOME/cmdline-tools/tools/bin
export ANDROID_PLATFORMS=$EXTERNAL_DRIVE/android-sdk/platforms
export ANDROID_PLATFORM_TOOLS=$ANDROID_HOME/platforms
After that I listed the available avds by executing the command:
avdmanager list avd
But I get an error:
The following Android Virtual Devices could not be loaded:
Name: Nexus_5X_API_26_Google_Play
Path: /run/media/user12/EXTERN_DRIVE/Android/.android/avd/Nexus_5X_API_26_Google_Play.ini
Error: Corrupted AVD ini file: /run/media/user12/EXTERN_DRIVE/Android/.android/avd/Nexus_5X_API_26_Google_Play.ini
---------
Name: Nexus_5_API_23_Marshmallow
Path: /run/media/user12/EXTERN_DRIVE/Android/.android/avd/Nexus_5_API_23_Marshmallow.ini
Error: Corrupted AVD ini file: /run/media/user12/EXTERN_DRIVE/Android/.android/avd/Nexus_5_API_23_Marshmallow.ini
I also tried to see if I am going to emulate the machine by doing:
emulator -avd Nexus_5X_API_26_Google_Play
But I got the following error:
PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT
Can anyone tell me what could be wrong about this or why I am I getting this error?