We are pleased to share that we have a new, Ubuntu 20.04-based, Android machine image available for preview*. The Android machine image, “android:202102-01”, has the Android SDK and other useful tools pre-installed. It also supports nested virtualization and hence x86 Android emulator-based UI tests can be run on it.
Here is a sample config that illustrates how to use the image:
version: 2.1
jobs:
build:
machine:
image: android:202102-01
resource_class: large
steps:
- checkout
- run:
name: Create avd
command: |
SYSTEM_IMAGES="system-images;android-29;default;x86"
sdkmanager "$SYSTEM_IMAGES"
echo "no" | avdmanager --verbose create avd -n test -k "$SYSTEM_IMAGES"
- run:
name: Launch emulator
command: |
emulator -avd test -delay-adb -verbose -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
background: true
- run:
name: Wait for emulator to start
command: |
circle-android wait-for-boot
- run:
name: Run UI tests
command: |
./gradlew connectedDebugAndroidTest
workflows:
build:
jobs:
- build
For more details on the image and what is pre-installed in it, please refer to the preview docs. We’re excited to receive your feedback!
*We may change and update the pre-installed software on the android:202102-01 image without prior notice during the preview period