QuasarApp / sdkmanager-android

Wraper of android sdk manager for snap store
MIT License
17 stars 2 forks source link

avdmanager not finding system image #8

Open dotChris90 opened 5 months ago

dotChris90 commented 5 months ago

i saw that the androidsdk snap also brings cmdline tools but a command like /snap/androidsdk/current/cmdline-tools/bin/avdmanager create avd --name android33 -k "system-images;android-33;google_apis;x86_64" brings just

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

Is this expected?

EndrII commented 5 months ago

HI @dotChris90, I still not added the support of other tools from android command-line tools, The android sdk manager provide fast access to and sdkmanager tool only.

Probably at current time (until i or somebody added full support of all command line tools) better will be setup environment of avdmanager manually. It is not too hard).

For example:

install latest sdktools into your android folder

androidsdk --install "cmdline-tools;latest"
androidsdk --install "emulator"
androidsdk --install "platform-tools"

install needed platform images

androidsdk --install  "system-images;android-33;google_apis;x86_64"

Setup the environment of new command line tools.

export ANDROID_SDK_ROOT=~/AndroidSDK
export PATH=$PATH:$ANDROID_SDK_ROOT/emulator
export PATH=$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools

run your command

avdmanager create avd --name android33 -k "system-images;android-33;google_apis;x86_64"

That all, it should be works fine.

P.S.

do not forget to install OpenJDK before using cmdline-tools in main system.

EndrII commented 5 months ago

i created separately issue #9

domdfcoding commented 3 months ago

I followed the instructions but I still get the same error.