Meetesh
Meetesh

Reputation: 182

Not able to Create AVD using command line

I have downloaded the basic Android command line tools from devloper.android.com, now i am creating a new AVD using following command

avdmanager create avd --package 'platforms;android-26;google_apis;x86' -n test-1

Its giving error

Error: Package path is not valid. Valid system image paths are:

I have already installed the package using sdkmanager and its available in my sdk folder under platforms.

Upvotes: 5

Views: 5864

Answers (1)

Nezir
Nezir

Reputation: 6915

First, you need to download the necessary packages. Here is an example of downloading API 23 packages for x86 emulators:

 ./sdkmanager "system-images;android-23;google_apis;x86"

and then create your emulator:

./avdmanager create avd -n test -k "system-images;android-23;google_apis;x86" -b x86 -c 100M -d 7 -f

Or you can try with this sample steps:

android update sdk -u --filter platform-tools,android-25
sdkmanager --verbose "system-images;android-25;google_apis;x86"

and then create the avd using:

avdmanager -v create avd -n x86 -k "system-images;android-25;google_apis;x86" -g "google_apis"

Upvotes: 8

Related Questions