Android

This content was generated with the assistance of AI and should be verified against the official documentation of Android before being relied on in production.

See the section bibliography for the reference material consulted while preparing these pages.

Welcome to the Android reference. It documents how to build native Android apps with Google’s own tools and language of choice: Android Studio, Gradle and Kotlin, on top of the Android SDK and Jetpack. The result runs directly on the platform, with no cross-platform layer in between.

This section targets Android 17 (API 37), built with Android Studio Quail 4 and the Android Gradle Plugin (AGP) 9.4, written in Kotlin 2.4.20. TrailMate, the running example used across most pages, sets compileSdk = 37, targetSdk = 36 (Google Play requires targeting API 36 for new apps and updates since 2026-08-31) and minSdk = 26. Every page names the exact library versions it uses — Compose BOM 2026.09.00, Navigation 2.10.2 and Navigation 3 1.2.0, Room 2.8.5/3.0.3, Hilt 2.60.1 and the rest — so examples compile against a consistent, current baseline rather than mixed-era snippets.

Both classic View-based UI (Activities, Fragments and XML layouts) and Jetpack Compose are covered in full, because most real Android codebases still contain both, and knowing where one ends and the other begins is part of the job. This section does not re-teach the Kotlin language itself — for that, see the Kotlin Reference, which this section links to instead of repeating, including its dedicated Kotlin for Android page. For the cross-platform alternative that targets Android and iOS from one TypeScript codebase, see React Native; for the native counterpart on Apple’s platforms, see Apple Platforms.

How Android app development got here

Year What changed

2008

The Android SDK shipped alongside the first Android phone, apps written in Java against the platform’s own UI toolkit (Views, Activities).

2011

Fragments arrived (Honeycomb, API 11) to let a UI be composed and reused across screen sizes, particularly on tablets.

2014

Android Studio replaced Eclipse/ADT as the official IDE, Gradle became the build system, and the Android Runtime (ART) replaced Dalvik. Material Design was introduced the same year, defining the platform’s visual language.

2017—​2018

The Architecture Components (ViewModel, LiveData, Room) and Jetpack — Google’s umbrella for versioned, backward-compatible libraries — gave the platform an opinionated answer to app architecture. AndroidX replaced the original support libraries with semantically versioned packages.

2019

Google announced Kotlin as its preferred language for Android development, ahead of Java.

2021

Jetpack Compose 1.0 shipped: a declarative, Kotlin-first UI toolkit that replaces the View system’s imperative API with composable functions and state-driven recomposition. The Google Play Console also began requiring the Android App Bundle format for new apps.

2022

Material 3 (Material You) became Compose’s default design system, with dynamic color and expressive theming.

2025

OSSRH (Sonatype’s original Central staging service) shut down on 2025-06-30, moving library publishing to the Central Publisher Portal, and Navigation 3 reached 1.0.0 as a from-scratch, Compose-first navigation library.

2026

AGP 9 made Kotlin support built-in (no separate Kotlin Gradle plugin needed) and switched to a new DSL by default; Android 17 (API 37) shipped, and Google’s phased developer verification program began rolling out.

Much of what older books and tutorials describe predates this timeline: Eclipse/ADT, JCenter, AsyncTask and Loaders, Kotlin synthetics, startActivityForResult, and LiveData-first, Views-only architectures. These pages document the current approach and name the older one only where a reader is likely to meet it in an existing codebase — see Books and official sources compared below for the full list.

New here? Read in this order

From there, pick the groups in What’s covered below in whatever order the app needs them: data and networking once it has something to store or fetch, system integration once it runs on a real device, and the quality and distribution pages before the first release.

The TrailMate app

Every code example across pages 1—​36 is a slice of one running app, TrailMate: a hiking-trail companion, package com.example.trailmate, that lists trails, shows their detail and lets a hiker mark favorites and capture photos. Its domain is small on purpose: Trail(id, name, region, lengthKm, difficulty, photoUrl, isFavorite), enum class Difficulty { EASY, MODERATE, HARD } and TrailPhoto.

TrailMate is built twice across these pages, in the two UI styles this section covers: a modern version with a single ComponentActivity, TrailMateApp() and Compose screens (TrailListScreen/TrailDetailScreen/SettingsScreen/PhotoCaptureScreen), and a legacy version with an AppCompatActivity hosting a NavHostFragment and TrailListFragment/TrailDetailFragment built with RecyclerView, ViewBinding and Safe Args. Both versions share the same data layer: a Retrofit-backed TrailApi (with a Ktor TrailApiClient shown as an alternative) against https://api.example.com/v1/trails, a Room TrailMateDatabase and a DataStore-backed UserPreferencesRepository, unified behind a TrailRepository interface implemented by OfflineFirstTrailRepository. A TrailSyncWorker keeps data fresh in the background, and a RecordHikeService foreground service tracks an active hike. Dependency injection is shown with both Hilt (TrailMateApplication, NetworkModule, DatabaseModule, RepositoryModule) and a Koin alternative (trailMateModule); images load through Coil in Compose and Glide in the legacy code. The app is split into Gradle modules :app, :core:model, :core:data, :core:database, :core:network, :feature:trails and :feature:settings, and is exercised by tests such as TrailListViewModelTest, OfflineFirstTrailRepositoryTest, TrailDaoTest and TrailListScreenTest.

Pages 37—​40 (building, signing, publishing and CI/CD) step away from TrailMate and use a real, published library instead — com.irurueta:irurueta-android-glutils — so that the build, signing and Maven Central publishing steps are shown against an actual build.gradle.kts and GitHub Actions workflow rather than a fictional one.

What’s covered

Foundations & tooling

Classic View-based UI

Jetpack Compose

Architecture: old vs. new

Data, networking & libraries

System integration & device features

Quality

Build, ship & automate

Reference

Books and official sources compared

Six books were read locally against the concepts documented here, purely to decide what to cover and to check for gaps — none of them is quoted or copied into this repository.

# Book Publisher / year / ISBN Publisher page

B1

Harun Wangereka, Mastering Kotlin for Android 14

Packt, 2024, ISBN 978-1-83763-171-1

Packt

B2

Kevin Brothaler, OpenGL ES 2 for Android: A Quick-Start Guide

Pragmatic Bookshelf, 2013, ISBN 978-1-937785-34-5

Pragmatic Bookshelf

B3

Alex Forrester, Eran Boudjnah, Alexandru Dumbravan, Jomar Tigcal, How to Build Android Apps with Kotlin

Packt, 2021, ISBN 978-1-83898-411-3

Packt

B4

Marcin Moskała, Igor Wojda, Android Development with Kotlin

Packt, 2017, ISBN 978-1-78712-368-7

Packt

B5

Dave Smith, Jeff Friesen, Android Recipes: A Problem-Solution Approach, 3rd ed.

Apress, 2014, ISBN 978-1-4302-6322-7

Springer

B6

Grant Allen, Android for Absolute Beginners

Apress, 2021, ISBN 978-1-4842-6645-8

Springer

Legend for the matrix below: full = the concept has a chapter or main section in that book; partial = partial coverage, or an older API for the same concept; none = not covered. The Official Android Developers documentation is the primary source behind every page regardless of book coverage.

Concept group (pages) Official B1 B2 B3 B4 B5 B6

Studio, project, Gradle, version catalogs (1—​2)

full

full

partial

full

partial

partial (Eclipse/ADT)

full

Manifest, components, intents, tasks (3)

full

partial

none

full

none

full

full

Resources, configuration, localization (4)

full

partial

none

partial

none

full

partial

Activity lifecycle (5)

full

partial

partial

full

partial

full

full

Fragments (6)

full

none

none

full

none

partial

full

XML views, layouts, widgets, themes (7)

full

none

none

full

partial

full

full

RecyclerView / lists (8)

full

none

none

full

full

partial (ListView)

partial

Custom views, drawing, animation, MotionLayout (9)

full

none

none

full

none

full

none

Fragment navigation, drawer, bottom nav, tabs (10)

full

none

none

full

none

partial

none

Compose fundamentals, layouts, state (11—​13)

full

full

none

none

none

none

none

Material 3 / theming (14)

full

full

none

partial (MDC)

none

none

none

Compose navigation / Navigation 3 (15)

full

partial (Nav 2)

none

none

none

none

none

Compose animation and gestures (16)

full

none

none

none

none

none

none

Adaptive layouts, edge-to-edge (17)

full

partial

none

partial (dual pane)

none

partial

none

Accessibility (18)

full

partial

none

none

none

none

none

Architecture, MVVM, layers (19)

full

full

none

full

partial

none

none

ViewModel, lifecycle, coroutines, Flow, LiveData, RxJava (20)

full

full

none

full

partial (RxJava)

partial (AsyncTask)

partial

State persistence, Views vs Compose (21)

full

partial (rememberSaveable)

none

full (onSaveInstanceState)

none

partial

partial

Views vs Compose comparison and migration (22—​23)

full

none

none

none

none

none

none

Preferences, DataStore, files, scoped storage (24)

full

partial

none

full

partial

full

full

Room / SQLite / Paging (25)

full

full

none

full

none

partial (SQLite)

partial (SQLite)

Networking: Retrofit, OkHttp, Ktor (26)

full

full

none

full (+Moshi)

partial

partial (HttpURLConnection)

none

Image loading: Coil, Glide (27)

partial

partial (Coil)

none

full (Glide)

partial (Glide/Picasso)

partial (manual)

none

DI: Hilt, Dagger, Koin (28)

full

full (Koin)

none

full (Dagger/Koin)

none

none

none

Background: WorkManager, services, alarms (29)

full

full

none

full

none

full

full

Notifications, FCM, app widgets (30)

full

partial (FCM)

none

full

none

full (AppWidgets)

full

Permissions, privacy, security (31)

full

full

none

full

none

partial

partial

Camera, location, maps, sensors, media, Bluetooth/NFC/USB, WebView (32)

full

none

none

partial (Maps)

none

full

full (media)

Graphics: Canvas, OpenGL ES, NDK, RenderScript (33)

full

none

full

none

none

partial

none

Unit tests: JUnit, Mockito, Robolectric (34)

full

full

none

full

partial

none

none

Instrumented / UI tests (35)

full

full (Compose)

none

full (Espresso)

none

none

none

Debugging, quality, performance (36)

full

full

partial

partial

none

partial

partial

Build, sign, publish on Play (37—​38)

full

full

none

full

none

none

none

Android libraries, Maven Central (39)

full

none

none

none

none

partial (library projects)

none

CI/CD with GitHub Actions (40)

none

full

none

none

none

none

none

Concepts found mostly in the books, folded into an existing page rather than given a page of their own: LeakCanary, Chucker, ktlint and detekt (B1, page 36); Firebase Crashlytics and Cloud Messaging (B1, pages 36 and 30); RxJava versus coroutines (B3/B4, page 20, as legacy); Data Binding (B3, page 7, as legacy); MotionLayout and CoordinatorLayout (B3/B6, page 9); Moshi (B3, page 26); Bluetooth, NFC, USB and WebView (B5, page 32); content providers (B5/B6, page 3); AppWidgets (B5, page 30); and NDK/RenderScript (B5, page 33, with RenderScript named as deprecated).

Official concepts documented from the official sources alone, with no book coverage: Navigation 3, adaptive layouts and window size classes, edge-to-edge and predictive back, the targetSdk 36/37 large-screen rules, Credential Manager, Baseline Profiles and Macrobenchmark, AGP 9’s built-in Kotlin and its new DSL, KSP2, Room 3, the photo picker, the Compose testing APIs, UI Automator 2.4, the Central Publisher Portal and the vanniktech plugin, Play developer verification, the 16 KB page-size rule, Coil 3 and Glide 5.

Outdated book material is named only as legacy, each with the modern replacement used on the matching page: Eclipse/ADT (Android Studio), JCenter (Maven Central), OSSRH (the Central Publisher Portal), kapt (KSP), Kotlin synthetics (View Binding), AsyncTask/Loaders (coroutines), IntentService (WorkManager), onRetainNonConfigurationInstance (ViewModel), ListView (RecyclerView/LazyColumn), RenderScript (Vulkan/AGSL), startActivityForResult (the Activity Result API), onBackPressed() (OnBackPressedCallback), Picasso (Coil), and LiveData-first design (StateFlow).

This section builds on material documented elsewhere on this site rather than repeating it. The Kotlin Reference covers the language every example is written in — including coroutines, flows and Kotlin for Android itself. Kotlin Multiplatform shares Kotlin code (and, with Compose Multiplatform, UI) between this TrailMate app and iOS, desktop and the web. React Native is the cross-platform alternative that targets Android and iOS from one TypeScript codebase, and Apple Platforms is the native counterpart on Google’s rival ecosystem, covering iOS, iPadOS, macOS, watchOS and visionOS with Swift and SwiftUI. Native and Mobile Apps is the OAuth protocol reference behind this section’s Credential Manager and sign-in material, Git & GitHub underlies the version control and pull-request workflow assumed on the CI/CD page, and Docker covers the containers that back the emulator and backend services a real TrailMate deployment would run against.

  • Android IDEs & Tools — Android Studio, IntelliJ IDEA, the Android Emulator and the SDK command-line tools, with links to each official page.

Bibliography

Android Developers documentation

The primary source for every page and every code example. Each concept page cites the specific articles and reference pages it uses; the entries below are every developer.android.com URL cited across the section, grouped by the same nav sections as What’s covered above.

Third-party libraries

The author’s repositories

Books

# Book Publisher / year / ISBN Publisher page

B1

Harun Wangereka, Mastering Kotlin for Android 14

Packt, 2024, ISBN 978-1-83763-171-1

Packt

B2

Kevin Brothaler, OpenGL ES 2 for Android: A Quick-Start Guide

Pragmatic Bookshelf, 2013, ISBN 978-1-937785-34-5

Pragmatic Bookshelf

B3

Alex Forrester, Eran Boudjnah, Alexandru Dumbravan, Jomar Tigcal, How to Build Android Apps with Kotlin

Packt, 2021, ISBN 978-1-83898-411-3

Packt

B4

Marcin Moskała, Igor Wojda, Android Development with Kotlin

Packt, 2017, ISBN 978-1-78712-368-7

Packt

B5

Dave Smith, Jeff Friesen, Android Recipes: A Problem-Solution Approach, 3rd ed.

Apress, 2014, ISBN 978-1-4302-6322-7

Springer

B6

Grant Allen, Android for Absolute Beginners

Apress, 2021, ISBN 978-1-4842-6645-8

Springer