name: android-dev
Use this skill when the user wants you to create, modify, build, run, debug, screenshot, or inspect an Android app in the desktop Android Emulator or on a USB-connected Android device.
This skill assumes the MCP server is configured in zcode as android_emulator. In zcode, MCP tools are exposed to the model as mcp__android_emulator__<tool>.
If the server is configured with a different name, use the corresponding visible mcp__<server>__... tool names from the active zcode tool list.
For a device-list request (including "use adb to list connected devices"), use
mcp__android_emulator__android_list_devices or an installed SDK adb outside the
workspace through Shell. No project discovery, build, or environment installation
is needed unless the user asks for it. MCP is optional. Use android_preflight
for diagnostics when available. Never execute a workspace adb executable.
mcp__android_emulator__android_preflight first.
INSTALL_ENVIRONMENT.md before continuing. Missing emulator-only checks do not block a selected ready USB device target.mcp__android_emulator__android_discover_project.
mcp__android_emulator__android_create_app.mcp__android_emulator__android_create_app refuses to overwrite generated files by default; only pass overwrite: true after explicit user confirmation.warnings in the discovery result before building and repair missing gradle.properties, local.properties, or Gradle wrapper issues.mcp__android_emulator__android_build_and_run.
module, variant, or applicationId when discovery is ambiguous.serial when the user wants a specific USB device or emulator. Use mcp__android_emulator__android_start_emulator only when a new GUI emulator is needed, then pass its returned serial to follow-up tools.output first for compile errors; use the returned log path only when more detail is needed.mcp__android_emulator__android_screenshot.mcp__android_emulator__android_open_url, mcp__android_emulator__android_launch_app, mcp__android_emulator__android_terminate_app, and mcp__android_emulator__android_logs.mcp__android_emulator__android_ui_status first.
mcp__android_emulator__android_ui_describe or mcp__android_emulator__android_ui_resolve before tapping coordinates.mcp__android_emulator__android_ui_tap, mcp__android_emulator__android_ui_swipe, mcp__android_emulator__android_ui_type_text, and mcp__android_emulator__android_ui_keyevent use ADB/UI Automator based backends.mcp__android_emulator__android_preflight is a pure diagnostic check. Use INSTALL_ENVIRONMENT.md for guided environment setup when it reports missing dependencies.serial for a specific USB device or emulator and avd for the fallback emulator to start only when no target is ready. mcp__android_emulator__android_start_emulator starts a new GUI emulator and does not reuse existing targets.mcp__android_emulator__android_create_app generates a minimal Kotlin + Jetpack Compose app suitable for model-driven iteration.mcp__android_emulator__android_build_app only builds. mcp__android_emulator__android_build_and_run builds, reuses the selected Android target by serial or starts a GUI emulator when needed, installs, and launches the app.ANDROID_PLUGIN_* environment variables.When creating or repairing a project manually, make sure these files exist before building:
settings.gradle or settings.gradle.ktsbuild.gradle or build.gradle.ktsapp/build.gradle or app/build.gradle.ktsgradle.properties with android.useAndroidX=truelocal.properties with sdk.dir=<Android SDK path> when the SDK is not otherwise discoverablegradlew / gradlew.bat) or gradle available on PATHandroid.useAndroidX property is not enabled, create or update gradle.properties with android.useAndroidX=true.android_preflight reports Gradle as not found, follow the quick Gradle fix in INSTALL_ENVIRONMENT.md; do not reinstall the Android SDK when Gradle is the only missing check.android_preflight reports no AVDs but a USB device is ready, continue by passing that device serial to target tools.local.properties in the Android Gradle root with sdk.dir=<Android SDK path>../gradlew or gradlew.bat is missing, install Gradle and run gradle wrapper --gradle-version 8.9, or let android_build_app attempt wrapper generation when gradle is available.sdkmanager or avdmanager cannot find Java after installing Homebrew openjdk@<configured JDK major>, export the matching JAVA_HOME from INSTALL_ENVIRONMENT.md and retry. Use the optional symlink step only after user confirmation.sdkmanager.bat --licenses, then retry the same package installation command.android_preflight.default image first and retry the exact sdkmanager --install command with a longer timeout before switching to larger google_apis images.The Android backend is deliberately isolated. P0 uses Android SDK tools, ADB/UI Automator, and Gradle. Future backends can map the same public operations to Android Studio semantic tools, a UI Automator helper APK, Appium/uiautomator2, or another automation bridge without changing the skill workflow.