How to Create an Android App with Android CLI
Google’s Android CLI, released in preview in April 2026, gives developers and AI agents a clean, terminal-based interface for Android app development. If you work with agentic workflows, CI pipelines, or simply prefer your editor over a full IDE, this tool is worth understanding.
This article walks through the core workflow: installing Android CLI, setting up the SDK, creating a project, and running it on an emulator — plus how Android Skills and the Android Knowledge Base fit into AI-assisted development.
Key Takeaways
- Android CLI is Google’s official terminal-based tool built primarily for AI agents, automation scripts, and CI/CD workflows.
- It complements Android Studio rather than replacing it, handling setup and boilerplate while the IDE remains the choice for UI work, debugging, and profiling.
- The core workflow — install, create SDK components, scaffold a project, build the APK, and run it on an emulator — takes only a handful of commands.
- Android Skills and the Android Knowledge Base keep AI agents aligned with current Android patterns, even when their training data is outdated.
- The CLI runs on Apple Silicon, AMD64 Linux, and AMD64 Windows, and integrates with agents like Gemini, Claude Code, and Codex.
What Is Android CLI and Who Is It For?
Android CLI is an official Google tool designed primarily for AI agents, automation scripts, and CI/CD workflows. It is not a replacement for Android Studio. Think of it as the first half of a development continuum: agents and scripts handle setup and boilerplate via the CLI, then developers open the project in Android Studio for UI refinement, debugging, and production profiling.
The CLI is available for Apple Silicon, AMD64 Linux, and AMD64 Windows.
Note: Google’s internal experiments report reduced LLM token usage and faster task completion compared to agents navigating standard SDK tooling manually. These figures come from Google’s own testing and have not been independently verified.
Step 1: Install Android CLI
Download the binary from the official Android agents page and follow the platform-specific installation instructions. Once installed, the android command becomes available in your terminal.
To keep the tool current, run:
android update
Step 2: Set Up the Android SDK
Instead of downloading a full Android Studio installation, Android CLI lets you pull only the SDK components you need:
android sdk install platforms/android-35 build-tools/35.0.0
This keeps your environment lean — useful for CI runners and agent-provisioned environments where disk space and setup time matter.
Step 3: Create an Android App Project
The android create command generates a new project from an official template, with recommended architecture applied from the start:
android create empty-activity --name="My App" --output=./my-app
This produces a modern Android project with Jetpack Compose, Material 3, and a sensible default structure. No manual Gradle configuration is required to get started.
Step 4: Create an Emulator and Run Your App
Spin up a virtual device:
android emulator create
Then build the APK and deploy it:
./gradlew assembleDebug
android run --apks app/build/outputs/apk/debug/app-debug.apk
The CLI streamlines device creation and deployment, reducing the manual setup steps that typically slow down both human developers and AI agents working in automated pipelines.
Discover how at OpenReplay.com.
How Android Skills and the Knowledge Base Fit In
Two companion features extend what agents can do with Android CLI:
Android Skills are modular, markdown-based instruction sets (SKILL.md files) that cover workflows like Navigation 3 setup, edge-to-edge UI implementation, and AGP 9 migrations. Skills are designed to trigger automatically when an agent’s prompt matches the skill metadata, so agents execute the right pattern without you manually attaching documentation every time.
Browse available skills via:
android skills list
The Android Knowledge Base, accessible through the android docs command, lets agents query up-to-date guidance from Android developer docs, Firebase, and Kotlin documentation. This matters because LLM training data goes stale. Even if your agent’s model is a year old, it can still retrieve current best practices through the Knowledge Base.
Android CLI vs. Android Studio: When to Use Which
| Task | Android CLI | Android Studio |
|---|---|---|
| SDK setup in CI | ✅ | ❌ |
| Agent-driven project creation | ✅ | ✅ |
| Visual UI design | ❌ | ✅ |
| Interactive debugging | ❌ | ✅ |
| Performance profiling | ❌ | ✅ |
| Scripted emulator management | ✅ | ❌ |
Getting Started
Android CLI is in preview, so expect rough edges and evolving documentation. That said, the core workflow — install, create, build, and run — already works well for experimentation and automated workflows with agents like Gemini, Claude Code, and Codex.
Start with android create, open the output in Android Studio when you’re ready to polish, and use Android Skills to keep your agent grounded in current Android patterns.
Conclusion
Android CLI fills a real gap in Android development by giving agents and automation pipelines a clean, scriptable entry point that previously required wrapping Android Studio’s tooling. Pairing it with Android Skills and the Knowledge Base creates a workflow where agents stay aligned with current best practices, while developers retain the full power of Android Studio for the work that genuinely benefits from a graphical IDE. As the tool matures past preview, expect it to become a standard part of CI setups and agent-driven Android workflows.
FAQs
No. Android CLI focuses on scriptable tasks such as SDK installation, project scaffolding, emulator management, and agent-driven workflows. Android Studio remains the recommended environment for visual UI design, interactive debugging, and performance profiling. The two tools are meant to complement each other across different phases of development.
The preview release supports Apple Silicon Macs, AMD64 Linux, and AMD64 Windows. ARM64 Windows and ARM64 Linux are not currently listed among supported platforms, so developers on those architectures should check the official Android CLI documentation for updates before relying on the tool in production pipelines.
Android Skills are reusable markdown instruction files that guide agents through specific workflows like Navigation 3 setup or AGP migrations, triggering automatically based on prompt metadata. The Knowledge Base is a query interface that fetches current documentation from Android, Firebase, and Kotlin sources, helping agents access fresh guidance even when their training data is outdated.
Android CLI is still in preview, so its API surface and behavior may change. It is suitable for experimentation and internal pipelines where breaking changes can be managed, but teams relying on stable tooling for production releases should monitor Google's release notes and consider pinning specific versions until the tool reaches general availability.
Understand every bug
Uncover frustrations, understand bugs and fix slowdowns like never before with OpenReplay — the open-source session replay tool for developers. Self-host it in minutes, and have complete control over your customer data. Check our GitHub repo and join the thousands of developers in our community.