Claude Code builds Kotlin and Jetpack Compose apps effectively when it runs the Gradle wrapper, unit tests, lint and an emulator itself and reads the results. Start from an Android Studio template, pin the architecture and library choices in CLAUDE.md, keep tasks feature-sized, and verify release builds early because code shrinking and permissions are where agent-built Android apps usually break.
On this page
Android development suits a terminal-based agent. The entire build runs through the Gradle wrapper, the emulator and device bridge are command-line tools, and nothing requires a specific operating system. Claude Code can therefore work through the full loop of writing Kotlin, compiling, testing and inspecting the running app on its own. What it needs from you is a well-defined project skeleton and a short list of decisions it should not make by itself.
Set up a skeleton the agent can extend
Generate the project with Android Studio's Empty Activity template for Jetpack Compose. That gives you a current Gradle setup with a version catalog (libs.versions.toml), Kotlin DSL build scripts and a working theme. Confirm that ./gradlew assembleDebug and ./gradlew testDebugUnitTest succeed from the terminal. From here Claude Code can add modules, screens and dependencies without fighting the build system.
If you expect the app to grow, ask the agent early to split it into modules, for example :core:data, :core:ui and one module per feature. Smaller modules compile faster, which shortens every iteration of the agent loop, and they limit how much code a single task can accidentally touch.
Decisions to write into CLAUDE.md
A Kotlin project has many valid stacks. If you leave the choice to the agent, it will make reasonable but inconsistent decisions across sessions. State the following in CLAUDE.md: minimum and target SDK levels; UI with Compose and Material 3; architecture (for example, view models exposing StateFlow, unidirectional data flow); dependency injection (Hilt, Koin or manual); persistence (Room or DataStore); networking (Retrofit or Ktor); and the test libraries. Add the commands for building, testing, lint and static analysis such as detekt or ktlint if you use them. Finally, list the files that require human approval: the manifest's permissions, the signing configuration, ProGuard or R8 rules and anything under google-services.json.
Close the loop with the emulator
Compiling is not enough for UI work. Start an emulator with hardware acceleration, then let Claude Code install the app with ./gradlew installDebug, launch it with adb shell am start, and capture the screen with adb exec-out screencap -p into a file it can read. The agent can then check spacing, text overflow, dark theme and different font scales. Ask it to change the system font scale through adb shell settings put system font_scale 1.3 once per feature; large font settings expose more layout bugs than any other single check.
For automated coverage, Compose UI tests and screenshot tests are both options. Unit tests for view models and repositories are the cheapest and should cover every state transition. Read our article on automated testing in an agentic coding workflow for a broader testing strategy.
Typical mistakes Claude Code makes on Android
Knowing the failure modes lets you review faster. Lifecycle and state: collecting flows without lifecycle awareness, or holding context references in view models; ask for collectAsStateWithLifecycle and review constructor parameters. Outdated APIs: suggestions based on older Android versions, such as deprecated permission or storage approaches; ask the agent to check the current documentation when in doubt. Dependency drift: adding a library version that conflicts with the version catalog; require all versions to live in the catalog. Permissions creep: adding a permission to make a feature work, which later costs you a declaration in the Play Console. Every new permission should appear in the pull request description with a reason.
Release readiness from the first week
Do not leave the release variant until launch. Configure code shrinking early and ask Claude Code to build and run assembleRelease or bundleRelease regularly with a local test signing key, so that missing keep rules show up while the codebase is still small. Check the merged manifest of the release variant for permissions added by libraries. Make sure the targetSdk meets Google Play's current requirement.
The production upload key is a different matter. Generate it yourself, keep it outside the repository and inject it through environment variables in CI, as described in code signing and certificates for AI-built apps. When you are ready to publish, follow publishing a Claude Code app on Google Play for the Console steps, or let AppSubmitter.io handle the account, closed test, listing and Data safety form until the app is live.
Getting your team productive
Experienced Android developers often get the most out of Claude Code, because they recognize architectural mistakes quickly and can write precise task briefs. Teams new to agentic workflows benefit from structured practice: how to scope a task, when to interrupt, how to review a diff of several hundred lines without missing what matters. The agentic coding workshops by neoOutput cover these skills with Kotlin and Compose examples, remote or on-site. The same habits are what our AI Code Engineers rely on when OnlineAppCreator builds and launches digital products for clients.
Frequently asked questions
Can Claude Code use Android Studio?
Claude Code works in the terminal and through IDE integrations. For Android it mostly uses the Gradle wrapper, adb and the emulator directly, while you can keep Android Studio open to review code and run the debugger.
Should I let Claude Code choose libraries?
Let it propose, but decide yourself and record the choice in CLAUDE.md and the version catalog. Consistency across sessions matters more than the specific library.
How do I stop the agent from adding permissions?
Add a rule to CLAUDE.md that new permissions require approval, and review the merged release manifest in CI so that permissions added by libraries are caught too.