I'm honestly obsessed with Claude Code. I build NowKit with it every day. But the first time I let it run a fresh Android build, my terminal froze for 47 minutes.
Short answer: Yes, Claude Code can build Android apps from your terminal. Install JDK 17, the Android SDK and Claude Code, then run
claudein your project folder. Give it a shortCLAUDE.mdorAGENTS.mdthat says where code goes and how to build. It builds with./gradlewand installs withadb. Let long Gradle builds finish in the background, and never kill one.
Here's what happened. Claude wrote a clean Compose screen and ran ./gradlew :app:assembleDebug. A fresh project downloads about 1 GB on its first build.
Claude Code gives a shell command 2 minutes by default. At the 2 minute mark, it killed Gradle in the middle of the download.
Then it ran the build again. Nothing. No error, no progress. Only a blinking cursor.
I stared at that cursor for 47 minutes. I restarted my Wi-Fi router twice and complained about my internet in two family groups.
The real reason was lock files. The killed build left them in ~/.gradle, and the new build was politely waiting for them to go away. They never would.
I learned it the hard way. Now long builds are the first thing my kit commands plan for.
Can Claude Code build Android apps?
Yes, and the terminal is the reason. It writes Kotlin and Compose, runs Gradle, reads the error, fixes the file and builds again. You don't copy anything.
Here's where it's great and where it's not, from my daily use:
| Task | How Claude Code does |
|---|---|
| Writing Compose screens | Very good, better with a screenshot of the design |
| Fixing Gradle compile errors | Very good, when it fixes the first error, not the last |
| Wiring a ViewModel, repository and Room | Good, when the project has one example to copy |
| Picking library versions | Risky. It can suggest versions that don't exist |
| Big AGP or Kotlin upgrades | Risky in one jump. Do small groups and build after each |
| Seeing a visual bug on your phone | Can't, unless you give it a screenshot |
| Play Console and store products | Can't click web consoles. It tells you the steps |
| Long first builds | Times out, unless it runs them in the background |
So I let it write and build. I look at the phone, and I click the consoles.
Still choosing between this and a prompt-to-app builder? I compared them in my vibe coding app guide.
How do you set up Claude Code for Android?
Install the Android tools once, install Claude Code, then open it in your project. It takes about an hour, mostly downloads.

- Install JDK 17 and check it with
java -version. - Install Android Studio once, only for its SDK Manager.
- Set
ANDROID_HOMEand addplatform-toolsto your PATH. My setup guide has the commands per system. - Check that
adb --versionprints a version.
Then install Claude Code from Anthropic's setup page:
curl -fsSL https://claude.ai/install.sh | bash # macOS, Linux, WSL
irm https://claude.ai/install.ps1 | iex # Windows PowerShell
Run claude --version in a new terminal. Then cd into your project and run claude.

The first thing my kit does in Claude Code: check the SDK, JDK 17 and the Gradle wrapper before touching any code.
It needs a paid Claude plan or a Console account. The free plan doesn't include it.
Optional, and worth it: Google ships an Android CLI for coding agents with emulator and SDK commands. It installs as a Claude Code plugin.
What should a CLAUDE.md for an Android project say?
Your stack, where new code goes, which files to leave alone, and the exact build commands. Keep it short. Without it, every prompt is a fresh guess.
Run /init and Claude drafts one by reading your code. Then cut it down. Anthropic suggests keeping it under 200 lines. Mine look like this:
# My app
Kotlin + Jetpack Compose + Material 3. Single `app` module, package-by-feature.
DI: Koin. Data: Room + DataStore. Navigation: type-safe routes in Route.kt.
## Rules
- New screens go in feature/<name>/. Leave core/ alone unless asked.
- Every user-facing string goes in res/values/strings.xml.
- Don't change gradle/libs.versions.toml without asking.
## Build
- Compile check: ./gradlew :app:compileDebugKotlin
- Builds take minutes. Run them in the background and wait. Never kill Gradle.
Using other agents too? Write the rules once in AGENTS.md. Claude Code reads AGENTS.md only when there's no CLAUDE.md in the project.
If you have both, it reads CLAUDE.md. So put a line with @AGENTS.md inside it to import the shared file. Anthropic's memory docs have the details.
That's how my kits work. One AGENTS.md for 5 agents, OpenCode included, and a tiny CLAUDE.md that imports it.
Test it in a fresh session. Ask "how do I add a new screen here?" If Claude answers with your real file names, you're good.
How do you turn repeated prompts into slash commands?
Save the prompt as a Markdown file in .claude/commands/, and its file name becomes the command. If I type the same long prompt twice, it becomes a custom slash command. A file at .claude/commands/run-app.md becomes /run-app. Anything you type after the name lands in $ARGUMENTS.
---
description: Build, install and launch the app on a connected device
---
1. Run `adb devices`. If nothing is listed, stop and tell me to connect a phone.
2. Run `./gradlew :app:installDebug` in the background and wait. Never kill it.
3. If it fails, show me the first error line and explain it in one sentence.
4. Launch the app with adb shell monkey and the applicationId from app/build.gradle.kts.
Commit the .claude/ folder, so anyone who clones the project gets the commands too. My kits ship 30 /kit-* commands built this way.
Why does Claude Code kill my Gradle build?
Because of its shell timeout. A foreground command gets 2 minutes by default and 10 minutes at most (as of December 2026), per Anthropic's settings docs. A first Android build often needs 10 to 30.

The fix is a rule: let Gradle finish. I tell Claude this before the first build:
This is the first build. It downloads about 1 GB.
Run it in the background, check the output every 30 seconds, and never stop it.
Or run the first build yourself in a second terminal, and tell Claude when it's done.
The commands I use daily, always with the wrapper, never a system gradle:
./gradlew :app:compileDebugKotlin # fast compile check
./gradlew :app:installDebug # build and install on your phone
./gradlew bundleRelease # release AAB, needs signing set up
If a build already hangs with no output, a killed build left its locks. Stop Gradle, delete the locks, and build again:
pkill -f GradleDaemon; pkill -f GradleWrapperMain
find ~/.gradle -name '*.lock' -delete
When a build fails, the useful line is the first e: line, not the wall of text at the bottom. Ask Claude to fix that one first.
How do you run the app on a phone or emulator?
Connect a phone with USB debugging on, or start an emulator, check adb devices, then run ./gradlew :app:installDebug and launch it with adb.
- On a real phone, turn on Developer options → USB debugging and accept the prompt.
- Or start an emulator from Android Studio's Device Manager or the Android CLI.
- Run
adb devicesand check your device is listed. - Run
./gradlew :app:installDebug. - Launch it:
adb shell monkey -p YOUR_APP_ID -c android.intent.category.LAUNCHER 1. - If it crashes, ask Claude to read
adb logcat -d '*:E'.
For visual bugs, screenshot the phone and drag it into the session. One picture of a button under the navigation bar beats three paragraphs.

This is Claude Code building a notes app from my mockups, 11 minutes in. It found that Compose 1.8 can render the mockup's italics and wrote the screens. I was making tea.
So, if your first build goes quiet, don't stare at it for 47 minutes like me. Check ~/.gradle for lock files before you blame your internet.
If you want Claude Code to start from an Android app that already has sign-in, a paywall and these build rules in its AGENTS.md, that's NowKit. /kit-run-app builds, installs and launches in one command. When you're ready for the store, my Google Play publishing guide picks up from there.




