TL;DR
- Claude Code has an official JetBrains plugin that works natively in Android Studio
- Install: official installer script, then add the Claude Code plugin from JetBrains Marketplace
- Plugin gives you native diff view, IDE diagnostics auto-shared, file references via Cmd+Option+K (Mac) or Alt+Ctrl+K (Win/Linux)
- Run
/initonce to generate a CLAUDE.md with your Kotlin/Compose conventions - Add a ktlint PostToolUse hook so every edit stays style-compliant
- Real impact at Applefy: XML-to-Compose migration on a 40-screen app shaved roughly 3 weeks off the timeline
Written by the Applefy team — we ship native Android in Kotlin and Compose, and Claude Code is part of our daily workflow on every Android project.
Android Studio is built on IntelliJ. IntelliJ has a real plugin marketplace. So unlike the Xcode side, Claude Code on Android gets a proper IDE integration.
Here's the setup we run on Kotlin and Compose codebases at Applefy — same engineering rigor as our iOS workflow, with the IDE plugin doing some of the heavy lifting.
Why the JetBrains Plugin Matters
Three things the plugin does that the bare CLI doesn't:
- Native diff view. Claude's proposed changes show up in Android Studio's diff panel — same UI you already use for git diffs. Less context-switching.
- Automatic diagnostics sharing. When IntelliJ flags a syntax error, lint warning, or unresolved reference, Claude sees it without you copy-pasting.
- File reference shortcut. Cmd+Option+K on Mac (Alt+Ctrl+K on Windows/Linux) inserts a reference to the current file or selection. Fast context.
The plugin doesn't replace the CLI. It runs with it. You still type into Claude Code in the integrated terminal — the plugin enhances what's already there.
Installation
Two steps.
Step 1 — Install Claude Code: Use the official installer from claude.ai/install.sh, or Homebrew if you prefer manual updates.
Step 2 — Install the plugin:
In Android Studio: Settings → Plugins → Marketplace → search "Claude Code" → Install → Restart.
Direct link: plugins.jetbrains.com/plugin/27310-claude-code-beta-
After restart, open the integrated terminal (View → Tool Windows → Terminal) and run claude. The plugin auto-activates — diffs and diagnostics sharing kick in automatically.
First-Project Setup
In the integrated terminal, run claude, then run /init.
/init analyzes your project and generates a CLAUDE.md. Non-optional in our workflow — it documents your build setup (Gradle Kotlin DSL or Groovy), Compose vs XML, architecture (MVVM, MVI), DI framework (Hilt, Koin), and conventions.
Commit it. Update it when patterns change.
A Real Applefy Example
On a recent Android project, a 40-screen app needed migration from XML layouts to Jetpack Compose. Standard answer: 6–8 weeks of careful, screen-by-screen rewriting.
Our actual approach with Claude Code:
"Convert this XML layout to Compose. Use the theme tokens defined in Theme.kt. Match the patterns from the screens already migrated — see LoginScreen.kt as reference."
Per screen, the first pass took roughly 2 minutes. Engineer review and adjustment: 15–25 minutes. Multiply by 40 screens, factor in the more complex layouts taking longer, and the migration came in around 5 weeks instead of 8.
The judgment didn't change. Component design, theme alignment, accessibility — all engineer decisions. Claude Code did the typing.
Workflows for Android Engineers
| Workflow | Time saved | Notes |
|---|---|---|
| XML → Compose migration | ~40% | Per-screen first pass, then engineer review |
| Refactoring Kotlin/Java | 70–80% | Renames, splits, structural changes |
| Debugging Gradle errors | 50–70% | Faster than guessing; AI reads build.gradle.kts |
| Writing tests with MockK/JUnit5 | 60–80% | Matches existing patterns from CLAUDE.md |
Configuring a ktlint Hook
The Android equivalent of the SwiftLint hook from our iOS guide. In your project's .claude/settings.json, register a PostToolUse hook that runs ./gradlew ktlintFormat after every Edit or Write.
After every file edit, ktlint formats. Output stays style-compliant.
Slash Commands Worth Using
| Command | When to use it |
|---|---|
/init | First time in a project — generates CLAUDE.md |
/clear | Long Gradle build session, context getting dense |
/compact [notes] | Summarize before clearing — keeps the thread |
/model | Switch to Opus for complex logic, Sonnet for speed |
/mcp | Connect MCP servers (GitHub, Firebase, etc.) |
Claude Code vs Other AI Tools for Android
| Tool | Strength on Android | Weakness |
|---|---|---|
| Claude Code (JetBrains plugin) | Multi-file refactoring, project context, hooks | Requires API access (no offline mode) |
| Android Studio Gemini integration | Tight Google integration, free tier | Single-file scope, weaker on complex refactors |
| GitHub Copilot in Android Studio | Inline autocomplete | No agent-level work, no project context |
| Cursor | Strong for non-Android-specific code | Built around VS Code; Android Studio users don't benefit |
For our workflow at Applefy — refactoring production Kotlin and shipping Compose UI — Claude Code wins. Gemini is a fine secondary tool for inline help.
Where Claude Code Falls Short
We don't trust it everywhere. Same rule as iOS:
- Threading and coroutines. Kotlin coroutines have subtle scoping rules Claude gets wrong sometimes. Review every change.
- Compose recomposition issues. Performance bugs from unstable parameters or unnecessary state reads need a human eye.
- Gradle dependency conflicts. AI suggestions can compile but break at runtime. Read every dependency change.
- ProGuard / R8 rules. Production minification edge cases. Verify in release builds.
Claude Code is your fast intern. Architecture is your job.
Frequently Asked Questions
Does Claude Code work in IntelliJ IDEA, not just Android Studio?
Yes. The plugin works in any IntelliJ-based IDE — IDEA, Android Studio, PyCharm, WebStorm, etc.
Will the plugin work with Compose Multiplatform?
Yes. It treats it as standard Kotlin code — no special configuration needed.
Do I need a separate license for Claude Code on Android Studio?
No. Same Anthropic account works across CLI, VS Code extension, and JetBrains plugin.
Can Claude Code run my Gradle builds?
With permission, yes — ./gradlew is a normal shell command. We use this for running tests after edits.
Does the plugin work offline?
No. Claude Code requires API access to Anthropic. There's no offline model.
How does Claude Code compare to Android Studio's built-in Gemini integration in 2026?
Gemini in Android Studio handles inline completions and small in-context help. Claude Code handles agent work — refactoring, multi-file edits, test generation. They serve different purposes; we use both.
Should I use the JetBrains plugin or just the CLI?
Use the plugin if you're in Android Studio. Diff view and diagnostics sharing are real productivity gains. Use the bare CLI for headless work or scripting.
Will Claude Code respect my project's existing architecture?
Only if CLAUDE.md describes it. The file is the contract. If you run MVVM with Hilt, document it. The output matches what's documented.
Can I use Claude Code for KMP (Kotlin Multiplatform) projects?
Yes. Treat shared code as standard Kotlin. The plugin doesn't have KMP-specific features but the CLI handles cross-platform projects fine.
How do I handle long Gradle builds — should I clear context?
Use /compact before a long build to summarize, then resume after. /clear if the session is genuinely done.



