How to set system images (path?) when creating an Android AVD?
Pay attention that android
is deprecated. Use avdmanager
.
First, you need to download the necessary packages. Example of downloading API 23 packages for x86 emulators:
./sdkmanager "system-images;android-23;google_apis;x86"
Then accept the license agreement
./sdkmanager --licenses
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
The message
Error: Package path is not valid. Valid system image paths are:
indicates that the package could not be found - I bet the platform wasn't correctly installed .. In order to fix that problem, You can try installing it using the following commands:
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"
.
I hope this helps.