Posted by Matthew Warner, Google Product Manager
Every developer’s AI workflow and needs are unique, and it’s important to be able to choose how AI helps your development. In January, we introduced the ability to choose any local or remote AI model to power AI functionality in Android Studio, and today, we’re announcing the availability of Gemma 4 for AI coding assistance in Android Studio. This new local model trained on Android development provides the best of both worlds: the privacy and cost-efficiency of on-device processing alongside state-of-the-art reasoning and tool-calling capabilities.
AI assistance, locally delivered
By running locally on your machine, Gemma 4 gives you AI code assistance that doesn’t require an internet connection or an API key for its core operations. Key benefits include:
- Privacy and security: Your code stays on your machine. Gemma 4 processes all Agent Mode requests locally, making it an ideal choice for developers working with data privacy requirements or in secure corporate environments.
- Cost efficiency: Run complex agentic workflows without worrying about hitting quotas. Gemma 4 is optimized to run efficiently on modern development hardware, utilizing local GPU and RAM to provide snappy, responsive assistance.
- Offline availability: Use the agent to write code even when you don’t have an internet connection.
- State-of-the-art reasoning: Gemma 4 delivers best-in-class reasoning, capable of complex multi-step coding tasks in Agent Mode.
Powerful agentic coding
Gemma 4 was trained for Android development with agentic tool calling capabilities. When you select Gemma 4 as your local model, you can leverage Agent Mode for a variety of development use cases, such as:
- Designing new features: Developers can ask the agent to build a new feature or an entire app with commands like “build a calculator app” and the agent will not only generate the UI code but will use Android best practices like writing in Kotlin and using Jetpack Compose.
- Refactoring: You can give high-level commands such as “Extract all hardcoded strings and migrate them to strings.xml.” The agent will scan your codebase, identify instances requiring changes, and apply the edits across multiple files simultaneously.
- Bug fixing and build resolution: If a project fails to build or has persistent lint errors, you can prompt the agent to “Build my project and fix any errors.” The agent will navigate to the offending code and iteratively apply fixes until the build is successful.
Recommended hardware requirements
The 26B MoE is recommended for Android app developers using a machine with the minimum hardware requirements. Total RAM needed includes both Android Studio and Gemma.
| Model | Total RAM needed | Storage needed |
|---|---|---|
| Gemma E2B | 8GB | 2 GB |
| Gemma E4B | 12 GB | 4 GB |
| Gemma 26B MoE | 24 GB | 17 GB |
Get started
To get started, ensure you have the latest version of Android Studio installed.
- Install an LLM provider, such as LM Studio or Ollama, on your local computer.
- In Settings > Tools > AI > Model Providers add your LM Studio or Ollama instance.
- Download the Gemma 4 model from Ollama or LM Studio. Refer to hardware requirements for model size selection.
- In Agent Mode, select Gemma 4 as your active model.
For a detailed walkthrough on configuration, check out the official documentation on how to use a local model.
We are excited to see how Gemma 4 enables more private, secure, and powerful development workflows. As always, your feedback is essential as we continue to refine the AI experience in Android Studio. If you find a bug or issue, please file an issue. Also you can be part of our vibrant Android developer community on LinkedIn, YouTube, or X. Happy coding!





