Android Development with Kotlin: Basics and Project Structure
Set up Android Studio, create an app with Kotlin, and understand activities, views, and the Android lifecycle.
Android development is Kotlin-first. Here’s how to start: setup, project structure, and core concepts.
Android and Kotlin development
Setup
Android Studio — Official IDE; includes SDK, emulator, and build tools. Install and run the SDK manager for the APIs you need.
Create a project — Choose “Empty Activity” or “Compose”; language Kotlin. Gradle (Kotlin DSL) builds the app. Run on an emulator or device.
Structure — app/src/main/java for Kotlin; res for layouts, drawables, and values. AndroidManifest.xml declares activities and permissions.
Core concepts
Activities — A single screen with a lifecycle (onCreate, onStart, onResume, onPause, onStop, onDestroy). Use for traditional View-based UIs or as a host for Compose.
Views and ViewGroups — XML layouts or Compose. Modern apps prefer Jetpack Compose (declarative UI in Kotlin).
Intents — Start activities, services, or send broadcasts. Use explicit intents for in-app navigation and implicit for sharing or opening URLs.
Gradle — Dependencies (e.g. AndroidX, Compose) and build variants (debug/release, flavors). Use version catalogs for consistency.
Android development approach (survey):
Android UI approach
Next steps
Learn Jetpack Compose for UI, ViewModel and StateFlow for state, and Room or DataStore for local data. Use the official Android guides and codelabs.
Android Kotlin basics:
Takeaway
Start with Kotlin and Android Studio. Learn the activity lifecycle and then move to Jetpack Compose for UI. The official docs and codelabs are the best next step.