Build: Android build (deprecated; use Gradle)

Last Update: 3/6/2017

Team Services | TFS 2017 | TFS 2015 | Previous versions: XAML Build, Release

Build an Android app using Gradle and optionally start the emulator for unit tests

Deprecated

The Android Build task has been deprecated. Use the Gradle task instead.

Demands

The build agent must have the following capabilities:

  • Android SDK (with the version number you will build against)
  • Android Support Repository (if referenced by Gradle file)

Arguments

Argument Description
Location of Gradle Wrapper

The location in the repository of the gradlew wrapper used for the build. Note that on Windows build agents (including the hosted pool), you must use the gradlew.bat wrapper. Xplat build agents use the gradlew shell script.

See The Gradle Wrapper.

Project Directory Relative path from the repo root to the root directory of the application (likely where your build.gradle file is).
Gradle Arguments

Provide any options to pass to the Gradle command line. The default value is build

See Gradle command line.

Android Virtual Device (AVD) Options
Name Name of the AVD to be started or created.
Note: You must deploy your own agent to use this option. You cannot use the hosted pool if you want to create an AVD.
Create AVD

Select this check box if you would like the AVD to be created if it does not exist.

AVD Target SDK Android SDK version the AVD should target. The default value is android-19
AVD Device (Optional) Device definition to use. Can be a device index or id. The default value is Nexus 5
AVD ABI

The Application Binary Interface to use for the AVD. The default value is default/armeabi-v7a

See ABI Management.

Overwrite Existing AVD Select this check box if an existing AVD with the same name should be overwritten.
Create AVD Optional Arguments

Provide any options to pass to the android create avd command.

See Android Command Line.

Emulator Options
Start and Stop Android Emulator

Check if you want the emulator to be started and stopped when Android Build task finishes.

Note: You must deploy your own agent to use this option. You cannot use the hosted pool if you want to use an emulator.
Timeout in Seconds How long should the build wait for the emulator to start. The default value is 300 seconds.
Headless Display Check if you want to start the emulator with no GUI (headless mode).
Emulator Optional Arguments (Optional) Provide any options to pass to the emulator command. The default value is -no-snapshot-load -no-snapshot-save
Delete AVD Check if you want the AVD to be deleted upon completion.
Control options

Android Signing