Android CLI:使用任何代理构建Android应用,速度提升3倍。
Android CLI: Build Android apps 3x faster using any agent

原始链接: https://android-developers.googleblog.com/2026/04/build-android-apps-3x-faster-using-any-agent.html

谷歌正在发布一套新的工具,以利用人工智能代理增强Android开发,无论您使用的是Android Studio中的Gemini,还是Claude等第三方选项。这些工具旨在通过使其扎根于当前的Android最佳实践,使代理工作流程更高效、更可靠。 本次更新的核心是经过改进的**Android CLI**,它提供项目创建、SDK管理和设备模拟等命令,从而显著加快设置速度并减少LLM令牌的使用。作为CLI的补充,**Android Skills**仓库提供模块化、可操作的指令,用于执行常见任务,例如Navigation 3迁移和Compose采用。 最后,**Android Knowledge Base**确保代理可以访问来自Google Developers、Firebase和Kotlin的最新官方文档,克服LLM训练数据限制。 这些工具旨在无缝协作,并促进顺利过渡*到* Android Studio,开发者可以在那里利用高级功能进行UI设计、调试和性能分析。Android CLI现已在d.android.com/tools/agents上提供预览版。

## Android CLI & AI 辅助开发 - 总结 谷歌发布了一款 Android 命令行界面 (CLI),旨在加速 Android 应用开发,目标是提高 3 倍的效率。该工具设计为与 AI 代理无缝协作,为 Android SDK 提供程序化接口。 讨论中,人们对改进工作流程的潜力感到兴奋,尤其是在项目设置等任务方面。然而,用户也指出了对谷歌 Android 工具的现有不满,并希望这预示着更广泛的改进。一些人已经开始尝试将 CLI 与 Termux 和 Claude 等工具结合使用,甚至构建了初始安装问题的解决方法。 人们对 CLI 的数据收集(可以通过标志禁用)以及 AI 代理集成可能带来的新的安全漏洞表示担忧。一个反复出现的主题是希望苹果生态系统也能获得类似的工具改进,以及对更好的命名约定和整体开发者体验的普遍呼吁。最终,人们希望这款 CLI 代表着朝着更高效和更合乎逻辑的开发实践迈出的一步,可能使人类程序员和 AI 驱动的工具都受益。
相关文章

原文

As Android developers, you have many choices when it comes to the agents, tools, and LLMs you use for app development. Whether you are using Gemini in Android Studio, Gemini CLI, Antigravity, or third-party agents like Claude Code or Codex, our mission is to ensure that high-quality Android development is possible everywhere.

Today, we are introducing a new suite of Android tools and resources for agentic workflowsAndroid CLI with Android skills and the Android Knowledge Base. This collection of tools is designed to eliminate the guesswork of core Android development workflows when you direct an agent’s work outside of Android Studio, making your agents more efficient, effective, and capable of following the latest recommended patterns and best practices.

Whether you are just starting your development journey on Android, are a seasoned Android developer, or managing apps across mobile and web platforms, building your apps with the latest guidance, tools, and AI-assistance is easier than ever. No matter which environment you begin with these resources, you can always transition your development experience to Android Studio—where the state-of-the-art tools and agents for Android development are available to help your app experience truly shine.

(Re)Introducing the Android CLI

Your agents perform best when they have a lightweight, programmatic interface to interact with the Android SDK and development environment. So, at the heart of this new workflow is a revitalized Android CLI. The new Android CLI serves as the primary interface for Android development from the terminal, featuring commands for environment setup, project creation, and device management—with more modern capabilities and easy updatability in mind.

The create command makes an Android app project in seconds.

In our internal experiments, Android CLI improved project and environment setup by reducing LLM token usage by more than 70%, and tasks were completed 3X faster than when agents attempted to navigate these tasks using only the standard toolsets.

Key capabilities available to you include:

  • SDK management: Use android sdk install to download only the specific components needed, ensuring a lean development environment.
  • Snappy project creation: The android create command generates new projects from official templates, ensuring the recommended architecture and best practices are applied from the very first line of code.
  • Rapid device creation and deployment: Create and manage virtual devices with android emulator and deploy apps using android run, eliminating the guesswork involved in manual build and deploy cycles.
  • Updatability: Run android update to ensure that you have the latest capabilities available.

Android CLI can create a device, run your app on it, and make it easier for agents to navigate UI.

While Android CLI will empower your agentic development flows, it’s also been designed to streamline CI, maintenance, and any other scripted automation for the increasingly distributed nature of Android development. Download and try out the Android CLI today!

Grounding LLMs with official Android Skills

Traditional documentation can be descriptive, conceptual, and high-level. While perfect for learning, LLMs often require precise, actionable instructions to execute complex workflows without using outdated patterns and libraries.

To bridge this gap, we are launching the Android skills GitHub repository. Skills are modular, markdown-based (SKILL.md) instruction sets that provide a technical specification for a task and are designed to trigger automatically when your prompt matches the skill's metadata, saving you the hassle of manually attaching documentation to every prompt.

Android skills cover some of the most common workflows that some Android developers and LLMs may struggle with—they help models better understand and execute specific patterns that follow our best practices and guidance on Android development.

In our initial release, the repository includes skills like:

  • Navigation 3 setup and migration.
  • Implementing edge-to-edge support.
  • AGP 9 and XML-to-Compose migrations.
  • R8 config analysis, and more!

If you’re using Android CLI, you can browse and set up your agent workflow with our growing collection of skills using the android skills command. These skills can also live alongside any other skills you create, or third-party skills created by the Android developer community. Learn more about getting started with Android skills.

Install Android skills via the Android CLI to make your agent more effective and efficient.

The latest guidance via the Android Knowledge Base

The third component we are launching today is the Android Knowledge Base. Accessible through the android docs command and already available in the latest version of Android Studio, this specialized data source enables agents to search and fetch the latest authoritative developer guidelines to use as relevant context.

The Android Knowledge Base ensures agents have the latest context, guidance, and best practices for Android.

By accessing the frequently updated knowledge base, agents can ground their responses in the most recent information from Android developer docs, Firebase, Google Developers, and Kotlin docs. This ensures that even if an LLM's training cutoff is a year old, it can still provide guidance on the latest frameworks and patterns we recommend today.

Android Studio: The ultimate destination for premium apps

In addition to empowering developers and agents to handle project setup and boilerplate code, we’ve also designed these new tools and resources to make it easier to transition to Android Studio. That means you can start a prototype quickly with an agent using Android CLI and then open the project in Android Studio to fine-tune your UI with visual tools for code editing, UI design, deep debugging, and advanced profiling that scale with the growing capabilities of your app.

And when it is time to build a high-quality app for large-scale publication across various device types, our agent in Android Studio is here to help, while leveraging the latest development best practices and libraries. Beyond the powerful Agent and Planning Modes for active development, we have introduced an AI-powered New Project flow, which provides an entry point to rapidly prototyping your next great idea for Android.

These built-in agents make it simple to extend your app ideas across phones, foldables, tablets, Wear OS, Android Auto, and Android TV. Equipped with full context of your project’s source code and a comprehensive suite of debugging, profiling, and emulation tools, you have an end-to-end, AI-accelerated toolkit at your disposal.

Get started today

Android CLI is available in preview today, along with a growing set of Android skills and knowledge for agents. To get started, head over to d.android.com/tools/agents to download Android CLI.

联系我们 contact @ memedata.com