How to set the device when creating a new avd with the Android orb

Introduction:

When using the circleci/android orb to test your project, you may want to test it with a specific device. You can do this by specifying an additional argument when calling the create-avd command.

Prerequisites:

Please ensure that you are using the latest version of the circleci/android orb in your project. 

The list of devices available can be confirmed by running the command avdmanager list.

Instructions:

  1. Step 1 - Specifying the device
    • A device can be specified by passing in the --device argument to the additional-args parameter of the create-avd command. Here is a sample selecting the device pixel_3a_xl:

      - android/create-avd:
          avd-name: myavd
          system-image: system-images;android-30;google_apis;x86
          install: true
          additional-args: --device pixel_3a_xl
      

      Here is a similar command when calling the underlying cli directly:

      avdmanager create avd -n "myavd" -k "system-images;android-29;default;x86" --device "pixel_3a_xl"

Additional Resources: 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.