This image is designed to supercede the legacy CircleCI Android image, circleci/android
.
cimg/android
is a Docker image created by CircleCI with continuous integration builds in mind.
Each tag contains an Android environment and toolchain.
Including several API SDKs, command line tools, build tools, Ant, Gradle, Google Cloud SDK, and more.
This image can be used with the CircleCI docker
executor.
For example:
1
2
3
4
5
6
7
8
jobs:
build:
docker:
- image: cimg/android:2024.11
steps:
- checkout
- run: ./gradlew androidDependencies
- run: ./gradlew lint test
In the above example, the CircleCI Android Docker image is used for the primary container.
More specifically, the tag 2024.11
is used meaning the August 2021 snapshot of the image is used.
You can now build and test Android projects within the steps for this job.
Additionally, you can use the Android Orb to access the Docker executor and configure your image in a standardized way.
While it is possible to use this image for emulation, it's highly recommended to use the machine image instead.
This image contains the Android SDK and CLI tools and includes, but is not limited to:
build-essentials
packageThis image has the following tagging scheme:
cimg/android:<tag>[-variant]
<tag>
- The snapshot of the image to use.
The available tags and a list of software pre-installed can be found in the Developer Hub.
[-variant]
- a variant tag can optionally be added.
The available variants can be found above.
Variant images typically contain the same base software, but with a few additional modifications.
The NDK variant is the same Android image but with the Android NDK installed.
Specifically a stable and LTS version.
The NDK variant can be used by appending -ndk
to the end of an existing cimg/android
tag.
1
2
3
4
5
6
jobs:
build:
docker:
- image: cimg/android:2024.11-ndk
steps:
- checkout
The Node.js variant is the same Android image but with Node.js also installed.
The Node.js variant will be used by appending -node
to the end of an existing cimg/android
tag.
1
2
3
4
5
6
7
jobs:
build:
docker:
- image: cimg/android:2021.08.1-node
steps:
- checkout
- run: node --version
The browsers variant is the same Android image but with Node.js, Java, Selenium, and browser dependencies pre-installed via apt.
The browsers variant can be used by appending -browser
to the end of an existing cimg/android
tag.
The browsers variant is designed to work in conjunction with the CircleCI Browser Tools orb.
You can use the orb to install a version of Google Chrome and/or Firefox into your build.
The image contains all of the supporting tools needed to use both the browser and its driver.
1
2
3
4
5
6
7
8
9
10
11
12
13
orbs:
browser-tools: circleci/browser-tools@1.1
jobs:
build:
docker:
- image: cimg/android:2021.08.1-browsers
steps:
- browser-tools/install-browser-tools
- checkout
- run: |
node --version
java --version
google-chrome --version