Android App Development: How to Build an Android App with Kotlin
An engineering guide to native Android app development: how we build production apps with Kotlin 2.x, Jetpack Compose, and Room while taming hardware fragmentation, OEM background task killers, Baseline Profiles, and Google Play Vitals thresholds.

On this page

Android app development is the work of building native software for Android phones, foldables, tablets, and enterprise hardware, today mostly in Kotlin and Jetpack Compose. If you're working out how to build an Android app, start with what sets Android apart from iOS: your binary doesn't run on one vendor's product line. It runs on a $110 Motorola handset in São Paulo, a Samsung Galaxy Z Fold in Seoul, a rugged Zebra barcode terminal inside a German warehouse, and a Pixel flagship in New York. Writing Kotlin and Jetpack Compose is the easy half of Android programming. Most of the engineering effort goes into an architecture that holds up across that hardware spread.
At Idealogic, we build and ship native Android apps for consumer brands, fintech companies, healthcare providers, and logistics fleets. If you want an experienced engineering team to build and launch your product end to end, see our Android app development services page. If you'd rather read the technical plan before anyone writes code, this guide covers the current Kotlin 2.x and Jetpack Compose stack, multi-module Gradle builds, defenses against device and OEM fragmentation, StrongBox and Play Integrity security, Google Play Vitals thresholds, and realistic build costs.
The short version
- Kotlin 2.x (K2 compiler) and Jetpack Compose are the default stack: declarative Material Design 3 UI with Coroutines,
StateFlow, Room SQLite, DataStore, and Hilt dependency injection replaces legacy Java and XML Fragments in new builds. - Device and OEM fragmentation is an architecture problem. Material 3
WindowSizeClassadaptive layouts handle phones, foldables, and tablets, whileWorkManagerand foreground service types stop Samsung and Xiaomi battery savers from silently killing background sync. - Baseline Profiles and R8 full mode matter most on mid-range phones: Google says Baseline Profiles improve code execution speed by about 30% from the first launch, and R8 shrinks the bytecode you ship. Your results will vary by app.
- Hardware security relies on StrongBox and the Play Integrity API. You store non-exportable keys in the Android Keystore StrongBox chip and verify client attestation through Google Play Integrity, which helps your backend reject rooted devices and repackaged APKs.
- Google Play Vitals affect store visibility: keep user-perceived crash rates below 1.09% and Application Not Responding (ANR) rates under 0.47%. Crossing those Android vitals thresholds can reduce your visibility on Google Play.
- A native Android build takes 8 to 18 weeks and $30k to $95k: 8 to 12 weeks for a focused MVP, 12 to 18 for a production v1. Budget scales with workflow complexity, offline sync requirements, compliance scope, and the breadth of your physical device QA matrix.
How to make an Android app in six steps
- Discovery: pin down the core workflow, the device and OS matrix, and the Play Console account type.
- Design: adaptive Material Design 3 screens for phones, foldables, and tablets.
- Architecture: Kotlin 2.x, Compose, Room, and Hilt in a multi-module Gradle project.
- Build: feature sprints, with offline sync and Baseline Profiles in from the start.
- QA and security: physical handset testing, Keystore hardening, and Play Integrity checks.
- Release: a signed App Bundle, closed testing, then a staged rollout watched through Android Vitals.
Why native Android app development is its own engineering discipline
Native Android app development means writing Kotlin against the Android SDK for hardware you don't control, on the most widely used mobile OS. StatCounter GlobalStats mobile OS data puts Android at about 70% of smartphones worldwide. It dominates continental Europe, Latin America, India, Southeast Asia, Africa, and enterprise hardware. Even in North America and Northern Europe where iOS leads consumer share, no mass-market product, field-operations platform, or regulated service can ignore Android without leaving millions of users behind.
A common and expensive mistake is treating an Android build as a line-by-line port of an iPhone spec. Android has a different runtime and different OS rules:
- The Android Runtime (ART) and garbage collection: Unlike Swift's deterministic ARC, Android executes bytecode on ART using generational garbage collection with ahead-of-time (AOT), profile-guided, and just-in-time (JIT) compilation. Allocating objects inside a 120Hz Compose draw pass triggers GC pauses and dropped frames on 4 GB RAM phones unless state stability is engineered deliberately.
- Configuration changes and process death: Rotating a screen, unfolding a hinged display, or toggling dark mode destroys and recreates the host
Activityby default. When a user switches to a heavy camera app, the OS silently kills backgrounded processes to reclaim RAM, and expects your app to restore navigation and form state throughSavedStateHandle. - Vendor-modified Android ROMs are the third difference. Samsung One UI, Xiaomi HyperOS, Oppo ColorOS, and Vivo FuntouchOS modify AOSP background scheduling, notification channels, and camera HALs in ways an emulator never reproduces.
Native Android app development vs cross-platform: when to write pure Kotlin
We analyze the financial and technical trade-offs between native and cross-platform stacks in native vs cross-platform app development and our cross-platform vs native knowledge base reference. For Android, the comparison looks like this:
If your business needs both Android and iOS in the same quarter and centers on standard API-driven screens, compare React Native vs Flutter first. When Android is your primary market, when your app has to run fast on budget hardware, or when your core value depends on background services, BLE, NFC, or enterprise device management, native Kotlin wins.
The Android app development tech stack
The current Android stack is Kotlin 2.x, Jetpack Compose, Room, Hilt, and Gradle with Baseline Profiles. Google groups these under Modern Android Development (MAD), which replaces verbose Java boilerplate, brittle AsyncTask threads, and fragile Fragment lifecycles. This is the production stack we standardize on at Idealogic:
Kotlin 2.x (K2 compiler), Coroutines, and StateFlow architecture
As our Kotlin knowledge base guide explains, the Kotlin 2.x K2 compiler is a rewrite of the compiler frontend. JetBrains' K2 compiler migration guide reports up to 94% faster compilation, with clean builds roughly 2x faster in its Anki-Android benchmark. Smart-cast inference across sealed interfaces improved too.
Following the Android Developers Guide to App Architecture, we structure every screen around Unidirectional Data Flow (UDF) with Coroutines and StateFlow:
- Immutable UI State (
sealed interfaceordata class): EachViewModelexposes oneval uiState: StateFlow<ScreenUiState>(Loading,Success,Empty,Error). User intents flow up to theViewModel; immutable state flows down to Compose. - Lifecycle-aware collection (
collectAsStateWithLifecycle): Collecting flows with plaincollectAsState()keeps database queries, location listeners, and polling active when the app is backgrounded.collectAsStateWithLifecycle()pauses collection when the lifecycle drops belowLifecycle.State.STARTED, which saves battery and prevents background crashes. - Offline-first synchronization: Repositories write API payloads into Room SQLite tables first and expose a reactive
Flow<List<DomainModel>>to the UI. Screens render cached local data right away on cold start while the network refresh runs asynchronously.
Jetpack Compose performance: avoiding recomposition jank
Jetpack Compose gets rid of XML layout files, but smooth 60Hz and 120Hz rendering needs strict state stability so the Compose compiler can skip unchanged subtrees:
- Enforce immutable models: Annotate cross-module models with
@Immutableor@Stable, or useImmutableList<T>so Compose knows list properties cannot mutate unseen. - Defer state reads with lambda modifiers: Pass rapidly changing scroll or drag values via lambda modifiers like
Modifier.offset { IntOffset(x, scrollOffset) }orModifier.graphicsLayer { alpha = animatedAlpha }to skip Composition and run directly in Layout or Draw. - Supply stable
keylambdas inLazyColumn: Always passkey = { item -> item.id }so row insertions or deletions do not force full item rebinding on mid-range phones.
Multi-module Gradle builds, KSP, and convention plugins
Monolithic :app modules using legacy kapt (Kotlin Annotation Processing Tool) stall engineering velocity because kapt generates Java stubs on every build. In our mobile app architecture blueprint, we enforce two rules from Sprint 1:
- Migrate 100% of processors to KSP (Kotlin Symbol Processing): Room and Hilt run directly on Kotlin symbols via KSP, which skips Java stub generation and is often much faster than
kapt. - Partition with Gradle Convention Plugins and Version Catalogs (
libs.versions.toml): We split repositories into:app,:core:designsystem,:core:network,:core:database,:core:model, and isolated:feature:*modules governed by Kotlin DSL convention plugins inbuild-logic/. Editing:feature:checkoutrecompiles only that module while pulling unchanged siblings from the Gradle build cache.
How to build an Android app that survives device and OEM fragmentation
You handle Android fragmentation with four defenses: adaptive layouts, Baseline Profiles with R8, background work that survives OEM battery savers, and hardware-backed security. You need all four because your binary runs across dozens of aspect ratios, multiple OS versions, budget chipsets, and aggressive OEM firmware.
The table maps the five fragmentation vectors to the defense we use for each:
Adaptive layouts with Material Design 3 and WindowSizeClass
Following Google's Material Design 3 (M3) guidelines, our UI/UX design and Android teams apply two layout rules to every mobile app design:
- Mandatory edge-to-edge insets: Apps targeting Android 15 (API 35) draw edge-to-edge behind system bars by default (see the Android 15 behavior changes), and that still applies when you target API 36. Screens must consume
WindowInsets(ScaffoldinnerPadding,Modifier.systemBarsPadding(),Modifier.imePadding()) so primary buttons never hide behind navigation bars or the keyboard. - Responsive
WindowSizeClassbreakpoints come second. ReadingcurrentWindowAdaptiveInfo().windowSizeClasslets a screen render a bottomNavigationBaronCompactphones and switch to a sideNavigationRailand two-paneListDetailPaneScaffoldonMediumfoldables andExpandedtablets without losing state.
Baseline Profiles and R8 full mode for faster cold starts
Unlike iOS binaries that arrive pre-compiled to ARM64 machine code, Android apps ship as DEX bytecode compiled on the handset by ART. Without profile rules, budget phones rely on JIT interpretation during the first session, which means slow cold starts and onboarding jank.
We cut that penalty with Android Baseline Profiles (androidx.profileinstaller + Macrobenchmark), Startup Profiles, and R8 full mode:
- Ahead-of-time compilation via Baseline Profiles: Automated instrumentation tests launch the app and exercise primary scroll and checkout paths to generate
baseline-prof.txtinside the App Bundle. Google Play uses those rules alongside Cloud Profiles to ahead-of-time compile critical methods during installation. Google's documentation cites about 30% faster code execution from the first launch. Treat that as a ballpark, since results vary by app. - DEX layout optimization via Startup Profiles: A Startup Profile, added alongside your Baseline Profile, tells R8 to pack all classes needed before the first frame (
reportFullyDrawn()) into the primaryclasses.dexfile, which reduces flash storage page faults on older eMMC and UFS chips. - R8 full-mode shrinking: R8 full mode has been the default since AGP 8.0, so your job is to keep it enabled and write keep rules for anything that uses reflection. R8 strips unused library code, inlines short Kotlin functions, optimizes sealed classes, and shrinks resource tables. The download often ends up substantially smaller.
Hardware security, Play Integrity API, and OWASP MASVS compliance
Because Android permits APK sideloading, adb debugging, and bootloader unlocking, you can't trust the client by default. Security rests on hardware key storage and runtime attestation. For fintech, healthtech, and enterprise products, we build against the OWASP Mobile Application Security Verification Standard (MASVS v2.1), detailed in our mobile app security guide:
-
Android Keystore and StrongBox: Never store tokens in plaintext
SharedPreferences. We generate AES-256-GCM keys inside the Android Keystore backed by a hardware StrongBox chip (setIsStrongBoxBacked(true)), then store encrypted payloads in Jetpack DataStore. Not every device has StrongBox, so catchStrongBoxUnavailableExceptionand fall back to the TEE. -
BiometricPrompt (
Class 3) andCredentialManager: We bindBiometricPrompt.CryptoObjectto Keystore cipher unlocking (setUserAuthenticationRequired(true)) so biometric checks are enforced by the OS kernel, and use JetpackCredentialManagerfor Passkeys and Google Sign-In. -
Google Play Integrity API: Before executing sensitive mutations, our backend verifies signed Play Integrity attestation tokens and reads three verdicts:
- Device integrity (
MEETS_STRONG_INTEGRITY/MEETS_DEVICE_INTEGRITY): Signals genuine, unrooted Android hardware rather than an emulator or hooked ROM. On Android 13 and later,MEETS_STRONG_INTEGRITYalso requires a recent security patch. - Application integrity (
PLAY_RECOGNIZED): Google Play recognizes the installed app, its package name, and its signing certificate. - Account licensing (
LICENSED): The user installed or bought the app through Google Play.
Treat these verdicts as signals for your risk logic. They don't prove a device is tamper-free.
- Device integrity (
-
Network Security Config: Disables cleartext HTTP (
cleartextTrafficPermitted="false") and pins SHA-256 SPKI public keys with backup pins insidenetwork_security_config.xml.
On Android, open distribution means your backend can't take a client request on faith. StrongBox hardware keys plus Play Integrity attestation give your API strong evidence that it's talking to an unmodified binary on an unrooted device.
Google Play Console release tracks, testing mandates, and Android Vitals
Shipping to Google Play requires a one-time $25 Play Console fee, a signed Android App Bundle (.aab), and a build that passes Google's automated scanners, policy checks, and Android Vitals thresholds.
1. Android App Bundles (.aab) and Play Console testing tracks
Using Play App Signing, your CI pipeline signs the .aab with a rotatable Upload Key while Google Play holds the final App Signing Key in cloud HSMs and serves split APKs tailored to each device's CPU architecture (arm64-v8a), screen density, and language, so each install is smaller than a universal APK. Always bundle your R8 mapping.txt file and native debug symbols for readable crash traces.
Builds progress through three pre-production gates:
- Internal Testing Track: Gets builds to up to 100 internal testers within minutes, so you can test Play Billing and Play Integrity in Sprint 1.
- Closed Testing Track (and the 14-day personal account rule): Google requires personal Play accounts created after November 13, 2023 to run a closed test with at least 12 testers opted in continuously for 14 days before they can apply for Production access. If you're a business, register a Google Play Organization account with a verified D-U-N-S number in Week 1 and you avoid this bottleneck.
- Pre-launch reports are the last check. Play runs an automated Robo crawl on Firebase Test Lab devices and reports crashes, layout overlaps, and accessibility warnings.
2. Google Play policy reviews and Android Vitals thresholds
To clear review on the first try and protect your store visibility, plan for four Google Play requirements. The details below reflect Google's policy pages in November 2026:
- Granular permissions (
Photo PickerandACCESS_BACKGROUND_LOCATION): Use the system Android Photo Picker (PickVisualMedia) instead of broadREAD_MEDIA_IMAGESpermissions, and avoid background location unless justified by a dedicated video review declaration. - Data Safety and web account deletion. Disclose all SDK data collection accurately in the Data Safety form, and provide both an in-app Delete Account flow and a public web deletion URL.
- Target API 36 and Play Billing Library 8+: Since August 31, 2026, new apps and updates must target API 36 (Android 16) and can no longer ship Play Billing Library 7. Route digital subscriptions and in-app purchases through Play Billing verified via Real-time Developer Notifications (RTDN).
- Android Vitals bad-behavior thresholds: Your visibility on Google Play can drop if your rolling 28-day metrics exceed the Android vitals thresholds of 1.09% user-perceived crash rate or 0.47% user-perceived ANR rate (the main thread blocked for more than 5 seconds). We roll out from 5% to 100% in stages only while crash-free sessions hold above 99.5% and ANRs stay below 0.15%.
Android app development timelines and cost breakdown
A focused native MVP takes 8 to 12 weeks and $30,000 to $50,000 with a senior Eastern European squad. A full production v1 takes 12 to 18 weeks and $55,000 to $95,000. Android app development budgets move mostly with scope and the size of your device matrix.
We publish a line-item native Kotlin and Google Play pricing ledger in Android app development cost, a cross-platform and native financial breakdown in our mobile app development cost guide, Apple-side pricing in iOS app development cost, shared Dart/Impeller budgets in Flutter app development cost, connected-hardware telemetry budgets in IoT app development cost, and all seven delivery phases in how to build a mobile app. Below are realistic timelines and budgets, at 2026 rates, for a native Kotlin and Jetpack Compose build with a senior Eastern European squad (US agencies typically bill 1.8x to 2.2x higher):
During our idea-to-product discovery sprints, we keep Android budgets predictable through three levers:
- Lock your device and OS matrix before Sprint 1: Supporting
minSdk 26with standard Compose M3 components moves fast; custom camera shaders on six-year-old 2 GB RAM devices doubles QA time. - Use Material Design 3 adaptive primitives in v1: Building on M3 tokens,
NavigationSuiteScaffold, and system sheets gives you foldable, tablet, dark-mode, and TalkBack support with very little extra work. - Evaluate shared vs dual-native early: If you need Android and iOS simultaneously without specialized hardware dependencies, check our mobile app development hub and mobile app development knowledge base to see if a shared codebase fits better. If you are building native apps for both stores, pair this guide with our playbook on how to build an iOS app.

CEO and Co-founder at Idealogic. Leading software strategy, systems architecture, and AI-native engineering squads since 2016.
Frequently asked questions
Android app development is the engineering discipline of building native software for Android phones, foldables, tablets, and enterprise hardware using Kotlin 2.x, Jetpack Compose, and Android Studio. A production build combines unidirectional StateFlow state management, Room SQLite persistence, Baseline Profiles for ahead-of-time startup optimization, and signed Android App Bundles shipped through Google Play.
Build every new Android app in Jetpack Compose with Material Design 3. Google recommends Compose for new UI and ships its new adaptive layout and animation APIs Compose-first. XML Views are still supported, and Compose interoperates with them through ComposeView and AndroidView, so you don't have to rewrite existing screens.
We control fragmentation with four engineering defenses. We set minSdk 26 or 28, which still covers the large majority of active devices. We build responsive layouts on Material 3 WindowSizeClass breakpoints. We route background work through WorkManager so it survives aggressive Samsung and Xiaomi battery killers. And we test on a physical handset matrix that includes budget three-year-old devices, because an emulator won't show you what a vendor ROM does.
Baseline Profiles are ahead-of-time (AOT) compilation rules bundled inside your Android App Bundle that tell the Android Runtime (ART) which critical startup and scroll paths to pre-compile during installation from Google Play. Combined with R8 full-mode shrinking, they speed up cold starts and first scrolls on mid-range hardware. Google cites about 30% faster code execution from first launch, though results vary by app.
Google Play requires personal developer accounts created after November 13, 2023 to run a closed test with at least 12 testers opted in for 14 continuous days before they can apply for production access. To avoid a launch delay, register a Google Play Console Organization account with a verified D-U-N-S number in Week 1 of discovery instead of using a personal account.
A focused native Android MVP with one core workflow and standard API integrations costs $30,000 to $50,000 with a senior Eastern European engineering squad, or typically $60,000 to $100,000 with a US agency. Full production v1 apps with offline Room sync, Google Pay, adaptive foldable layouts, and Baseline Profiles range from $55,000 to $95,000, regulated fintech and healthtech builds run $95,000 to $170,000, and enterprise rugged fleet or MDM kiosk ecosystems start at $170,000 to $285,000+.
A focused native Android MVP reaches Google Play in 8 to 12 weeks, and a full production v1 in 12 to 18. A typical v1 schedule: 2 weeks for discovery and device-matrix scoping, 3 weeks for Material 3 adaptive UX design, 6 to 8 weeks for modular Kotlin and Jetpack Compose sprints, 2 to 3 weeks for physical handset QA and security hardening, and 1 to 2 weeks for Play Console review and staged rollout.
Choose native Kotlin and Jetpack Compose when your product targets Android exclusively, relies on background services, Bluetooth Low Energy, NFC, custom camera/NDK pipelines, or enterprise MDM/kiosk hardware, or must run smoothly on sub-$150 emerging-market phones. If you need both Android and iOS simultaneously for standard data workflows, React Native or Flutter cuts total cost by 35% to 40%.
More from the journal

Android App Development Cost in 2026: Kotlin Tiers & TCO
Native Android app development cost in 2026 runs $30,000 to $50,000 for a Kotlin MVP, $55,000 to $95,000 for a production v1 app, and $95,000 to $170,000+ for regulated builds. See our line-item OEM QA matrix math, Google Play fees, and 24-month TCO.

Knock vs Novu vs Courier in 2026: Notification Infrastructure & TCO
Engineering and 36-month TCO teardown of Knock vs Novu vs Courier in 2026: event vs per-message billing traps, MongoDB self-hosting overhead, PostgreSQL 17 FORCE RLS digest batching, and multi-channel fan-out math.

Sendbird vs Stream in 2026: Chat SDKs, PCC & 36-Month TCO
Engineering and 36-month TCO teardown of Sendbird vs Stream in 2026 alongside CometChat, PubNub, and Ably: Peak Concurrent Connection cliffs, Go/RocksDB edge latency, Redis Streams plus PostgreSQL 17 chat ledgers, and owned messaging math.