Android Studio is where Android work happens: Gradle sync, the layout tools, Logcat, the emulator and the profiler. Claude Code is a terminal agent that reads your project, edits files and runs commands. You do not have to choose. Anthropic ships a JetBrains plugin, and Android Studio is on its supported list.
This post covers the setup, what the integration actually gives you, a sensible daily loop, and the settings worth changing on day one.
What the integration does
Anthropic’s JetBrains docs list these features:
- Quick launch. Press Cmd+Esc on Mac or Ctrl+Esc on Windows and Linux to open Claude Code from the editor.
- Diff viewing. Proposed code changes open in the IDE’s diff viewer instead of the terminal.
- Selection context. Whatever you have selected or open in the editor is shared with Claude automatically.
- File reference shortcuts. Cmd+Option+K on Mac or Alt+Ctrl+K on Windows and Linux inserts a reference such as
@src/auth.ts#L1-99. - Diagnostic sharing. Claude reads the IDE’s inspection diagnostics, “such as lint and syntax errors”, by calling a
getDiagnosticstool.
The last one matters most for Android. Inspection problems show up in the editor, and Claude can read them without you copying anything. One catch from the docs: Claude Code “doesn’t request diagnostics from the plugin on its own after edits”, so ask it to check diagnostics when you want that.
Setup in four steps
- Install the CLI. Follow Anthropic’s install guide so the
claudecommand works in a terminal. - Install the plugin. In Android Studio, open Settings, then Plugins, search the Marketplace for “Claude Code,” and install it.
- Restart Android Studio. The docs say a full restart may be needed, sometimes more than once.
- Start Claude from the built-in terminal. Open the Terminal tool window at your project root and run
claude. The integration features activate on their own.
If you prefer an external terminal such as iTerm or Ghostty, start claude there and run:
/ide
That connects the session to the running IDE. Start Claude from the same project root that Android Studio has open, so file paths line up.
Settings worth changing
Diff tool
Run /config inside Claude Code and set Diff tool to auto so diffs open in Android Studio. Set it to terminal if you want them inline in the terminal instead.
The Escape key
In JetBrains terminals, Escape can jump focus to the editor instead of interrupting Claude. The fix from the docs: go to Settings, then Tools, then Terminal, and uncheck “Move focus to the editor with Escape.” You can also delete the “Switch focus to Editor” shortcut.
Plugin settings
The plugin has its own page at Settings, then Tools, then Claude Code [Beta]. There you can set a custom command (for example a path to a specific claude install) and turn on Option+Enter for multi-line prompts on macOS.
A daily loop that works
Here is a loop that plays to each tool’s strengths.
1. Plan in Claude Code. Use plan mode (Shift+Tab, or claude --permission-mode plan) to have Claude read the code and propose steps before changing anything. Point it at specific files with the file reference shortcut.
2. Review edits in the diff viewer. Accept or reject each change in Android Studio’s diff UI. This is where you catch a wrong import or a renamed resource.
3. Build from the terminal. Claude can run Gradle directly. Android’s command line docs give the basics:
./gradlew assembleDebug
./gradlew installDebug
./gradlew tasks
The docs note that a debug build is signed with a debug key and cannot be published. That is fine for the edit loop.
4. Run on the emulator. You can start an emulator from the command line. Android’s docs show emulator -list-avds to list virtual devices and emulator -avd <name> to start one, though the same page now says the standalone emulator tool is deprecated in favor of the newer Android CLI. Starting it from Android Studio’s Device Manager works just as well.
5. Check runtime problems in Logcat. Copy a crash stack trace into Claude, or ask it to run adb logcat with a filter. Then fix, rebuild, repeat.
If you build with Flutter rather than native Kotlin, the same plugin works, since Android Studio is a common Flutter IDE. The loop changes to flutter run and flutter analyze. Our Flutter build errors guide covers the Gradle and plugin errors you are likely to hit.
Give Claude your project rules
Claude Code reads a CLAUDE.md file at the project root. For an Android project, put the things it cannot guess:
- Min and target SDK, and which Gradle commands you use.
- Architecture rules, such as “ViewModels never touch the network directly.”
- Which modules exist and what goes where.
- Commands to run before calling a task done, such as lint and unit tests.
Anthropic’s cost docs suggest you “Aim to keep CLAUDE.md under 200 lines.” Our CLAUDE.md for Flutter post shows a full example, and most of it carries over to Kotlin projects.
Security notes from the docs
Two points from Anthropic’s JetBrains page are worth knowing:
- With auto-edit permissions on, Claude “may be able to modify IDE configuration files that can be automatically executed by your IDE.” The docs suggest manual approval mode for edits and only using Claude with trusted prompts.
- To keep secrets out of context, add a Read deny rule for files like
.env. On Android, add yourlocal.propertiesand signing config too, since those often hold keystore paths and passwords.
Never let an agent touch your upload key. If you lose it, see what to do when a Google Play upload key is lost.
What about Gemini in Android Studio?
Android Studio ships its own assistant, Gemini, with features tied to the IDE such as Logcat crash help and Compose previews. Some developers run both: Gemini for IDE-native tasks and Claude Code for multi-file changes driven from the terminal. We compare them in Claude Code vs Gemini in Android Studio.
Troubleshooting
- Plugin does nothing. Check that
clauderuns in a terminal, then restart the IDE fully. - Wrong project. Start Claude from the project root the IDE has open.
- Remote development. The docs say that with JetBrains Remote Development, the plugin must be installed on the remote host, not the local client.
- WSL. There is a separate troubleshooting guide for WSL setups.
Where to go next
For the full picture of using an agent across iOS, Android and cross-platform work, read the Claude Code mobile app development guide. If you plan to ship to Google Play, the Google Play launch checklist covers what comes after the code. MobileKit adds ready-made skills on top of this setup if you want a spec-first workflow.
Sources read on the day this post was written: Claude Code docs: JetBrains IDEs, Claude Code docs: Common workflows, Claude Code docs: Manage costs effectively, Android Developers: Build your app from the command line and Android Developers: Start the emulator from the command line.