android-github-actions-emulator
android-github-actions-emulator copied to clipboard
Flag '-t' is not valid for 'create avd'
Hi! :wave: I'm having some problems running the UI tests with this. I'm getting the following error:
Run vgaidarji/[email protected]
/usr/bin/docker run --name ee61cca6afee48244a39b88e475c114debc_6e2ecf --label 671ee6 --workdir /github/workspace --rm -e HOME -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/android-template/android-template":"/github/workspace" 671ee6:1cca6afee48244a39b88e475c114debc
*************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
Running /opt/android-sdk/tools/bin/avdmanager create avd --force -n test -t android-21 --abi default/armeabi-v7a
Error: Flag '-t' is not valid for 'create avd'.
Usage:
avdmanager [global options] create avd [action options]
Global options:
-s --silent : Silent mode, shows errors only.
-v --verbose : Verbose mode, shows errors, warnings and all messages.
--clear-cache: Clear the SDK Manager repository manifest cache.
-h --help : Help on a specific command.
Action "create avd":
Creates a new Android Virtual Device.
Options:
-a --snapshot: Place a snapshots file in the AVD, to enable persistence.
-c --sdcard : Path to a shared SD card image, or size of a new sdcard for
@biklas7 there's an issue with docker image config for this action, https://github.com/vgaidarji/docker-android/issues/11. I'm still trying to figure out how to fix that (basically find a stable setup). And I'm facing similar issue, see this build - https://github.com/vgaidarji/ci-matters/runs/348152484
No ETA though, tried few times to fix it but not luck...
@vgaidarji instead of -t android-21 have you tried specifying the target with something like this -k "system-images;android-25;google_apis;x86"? Also update the sdk manager.
See this https://github.com/kukreja-vikramaditya/ARD/commit/55f5120739e26389be03fc67092f4020474545f8
Also check this: https://developer.android.com/studio/tools/help/android.html
Which says:
This tool is no longer supported. Instead use Android Studio to create AVDs and create projects, or use sdkmanager to view and install SDK packages from the command line.
Also in here: https://developer.android.com/studio/command-line/avdmanager it has an example to create an avd like: avdmanager create avd -n test -k "system-images;android-25;google_apis;x86"
@vgaidarji instead of -t android-21 have you tried specifying the target with something like this -k "system-images;android-25;google_apis;x86"? Also update the sdk manager.
@biklas7 Thank you, yes I'm aware of parameters change and sdkmanager tool. I tried a variety of configurations but none is working properly for me, emulator image is created but hangs after the start. Playing around locally in https://github.com/vgaidarji/docker-android/tree/adjust-emulator-commands branch.