androidcommand-lineandroid-emulatoravd-manager

How to create an AVD for "system-images;android-27;google_apis;x86" using avdmanager command line in Ubuntu?


I am able to create emulators for android-26 and older using the avdmanager command line, but I am getting the following error when trying to create for android-27 and above:

~/Android/sdk/tools/bin/avdmanager create avd --force -n Tablet -k "system-images;android-27;google_apis;x86" -d 6 --sdcard 200M
    Error: Package path is not valid. Valid system image paths are:ository...       
    system-images;android-26;google_apis;x86
    null

The same command for android-26 works:

~/Android/sdk/tools/bin/avdmanager create avd --force -n Tablet -k "system-images;android-26;google_apis;x86" -d 6 --sdcard 200M

Am I missing anything?

P.S.: This is happening in Linux Ubuntu. It seems to work fine in Mac OS.


Solution

  • Your command is correct but problem is that in your system, you don't have "android-27" OS

    Please check which OS you have in your system, go into following directory

    directory path : ~\Android\Sdk\platforms

    if you don't have it please download it first.

    download command is : sdkmanager --install "system-images;android-27;google_apis;x86"