Build app
buildCompiles an Android module and variant into an APK, returning compiler errors and the output APK path.
Instructions
Assemble an APK for a module and variant (default: the app module, debug). Returns compiler errors and the APK path.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "build"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module | No | Module path, e.g. :app. Defaults to the first application module. | |
| variant | No | Build variant, e.g. debug, release, freeDebug | debug |
| waitSec | No | Seconds to wait before returning. If the build is still running, poll with job_status. | |
| projectDir | No | Android project root. Defaults to ANDROID_PROJECT_DIR or the server's cwd. |