0

I'm trying to build avd from console and faced with issue to provide right avd

Cannot find AVD system path. Please define ANDROID_SDK_ROOT

or

PANIC: Unknown AVD name [/home/dmitry/.android/avd/Nexus_4_API_26.avd], use -list-avds to see valid list.

this is what list avd returns to me

    Name: Nexus_4_API_26
  Device: Nexus 4 (Google)
    Path: /home/dmitry/.android/avd/Nexus_4_API_26.avd
  Target: Google APIs (Google Inc.)
          Based on: Android 8.0 (Oreo) Tag/ABI: google_apis/x86
    Skin: nexus_4
  Sdcard: 100M

Full command with PATHs

dmitry@dmitry-H270-HD3:~/aosp/oreo$ sudo ./prebuilts/android-emulator/linux-x86_64/emulator -sysdir out/target/product/generic/ -system out/target/product/generic/system.img -ramdisk out/target/product/generic/ramdisk.img -data out/target/product/generic/userdata.img -kernel prebuilts/qemu-kernel/arm64/kernel -qemu-scale 0.7 -memory 2048 -partition-size 4096-verbose -avd Nexus_4_API_26
PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT
dmitry@dmitry-H270-HD3:~/aosp/oreo$ echo $ANDROID_SDK_ROOT
/home/dmitry/Android/Sdk
dmitry@dmitry-H270-HD3:~/aosp/oreo$ echo $ANDROID_HOME
/home/dmitry/Android/Sdk
dmitry@dmitry-H270-HD3:~/aosp/oreo$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/dmitry/Android/Sdk/tools:/home/dmitry/Android/Sdk/platform-tools:/home/dmitry/Android/Sdk/emulator:ANDROID_AVD_HOME:/home/dmitry/.android/avd

Any thoughts what is the root cause of the issue?

Gleichmut
  • 5,953
  • 5
  • 24
  • 32

1 Answers1

0

This seems to be an issue relating to the recent update. A temporary solution is to launch emulator from within the /path/to/android-sdk/tools directory in the commandline.

See https://code.google.com/p/android/issues/detail?id=235461 to follow the issue.

source

Gleichmut
  • 5,953
  • 5
  • 24
  • 32