Testing with the Android emulator on CircleCI

Andriod Emulator

CircleCI supports running the Android emulator through our Android machine image, which supports x86 Android emulator tests and nested virtualization. Documentation is available here:


We also recommend using the circleci/android orb in your config as it provides useful commands for emulator testing.

Note: The Android machine image is different from the Android docker convenience images, which do not support emulators

Common UI Test Failures 

Insufficient memory

We recommend using at least a resource class of at least "large" and above, as "medium" is usually insufficient to run the emulator and gradle processes.

Emulator configuration

Higher API levels and/or system images that come with Google APIs installed have been observed to be less stable, or require specific emulator options (e.g. no-window to be enabled/disabled). If UI tests are failing, we recommend trying out a different image. Please check a list of our Android machine images here:


Additional options such as partition-size can be set for the emulator via the Android orb's additional-emulator-args parameter.

Emulator animations

We recommend disabling of emulator animations to prevent interference with tests. This can be done through this orb command, disable-animations , or other commands from the orb that wrap it.


Some degree of flakiness may be expected from the emulator. We recommend using our android orb command, run-tests, (or other commands from the orb that wrap it, like start-emulator-and-run-tests) to run your tests with, as it supports retries



Was this article helpful?
30 out of 57 found this helpful



Article is closed for comments.