3

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.

Claudio de Souza
  • 103
  • 1
  • 11

1 Answers1

6

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"

Xavier Lowmiller
  • 1,381
  • 1
  • 15
  • 24
Parkash
  • 111
  • 6
  • Thanks, @Parkash, for the answer. I have checked and it shows that I have it: ` ~/Android/sdk/platforms/ total 32 drwxr-xr-x 8 user user 4096 Jul 31 11:51 ./ drwxr-xr-x 18 user user 4096 Jul 30 13:50 ../ drwxr-xr-x 5 user user 4096 May 5 2016 android-22/ drwxr-xr-x 6 user user 4096 Aug 7 2016 android-23/ drwxr-xr-x 6 user user 4096 Aug 7 2016 android-24/ drwxr-xr-x 6 user user 4096 Jan 12 2017 android-25/ drwxrwxr-x 6 user user 4096 Jul 30 11:54 android-26/ drwxr-xr-x 6 user user 4096 Jul 31 11:51 android-27/ ` – Claudio de Souza Aug 03 '18 at 18:34
  • `advmanager list avd` gives me an empty list of avds `Available Android Virtual Devices:`. The `avdmanager list target` gives me the platform that I want to create the emeulator: `id: 6 or "android-27" Name: Android API 27 Type: Platform API level: 27 Revision: 3` – Claudio de Souza Aug 03 '18 at 18:48
  • you have any information about ABI type ? "x-86" , "armeabi-v7a" – Parkash Aug 03 '18 at 18:50
  • Please use following command :- a.) ~/Android/sdk/tools/bin/avdmanager create avd --force -n Tablet -k "system-images;android-27;google_apis;x86" -d 7 --sdcard 200M b.) ~/Android/sdk/tools/bin/avdmanager create avd --force -n Tablet -k "system-images;android-27;google_apis;x86" – Parkash Aug 03 '18 at 19:04
  • Thanks for your help. I figured that my Linux machine was missing the package. android-27 was partially installed. By running `sdkmanager --install "system-images;android-27;google_apis;x86"` fixed the problem – Claudio de Souza Aug 03 '18 at 19:07