Project Starters

Android Project Starter (Kotlin + Compose)

Spin up a new Android app in Android Studio, get the emulator running, and know which files matter.

AndroidKotlinJetpack Composemobile

Before you start

You need Android Studio (current stable) — it bundles its own JDK and SDK manager, so you don't need to install Java separately.

Create the project

  1. Android Studio → New Project → Empty Activity (this is the Compose template; the old XML one is called "Empty Views Activity").
  2. Name it, keep the suggested package (com.example.myapp), language Kotlin, minimum SDK API 26 unless you have a reason to go lower.
  3. Click Finish, then wait for Gradle sync to finish (watch the bottom status bar — nothing works until it's done, and the first sync can take several minutes).

Get an emulator

  1. Tools → Device Manager → Create Virtual Device.
  2. Pick a Pixel, pick the latest stable system image (download if needed), Finish.
  3. Press the green Run ▶ button. First boot is slow; leave the emulator open between runs.

A real phone also works: enable Developer Options (tap Build Number 7 times), turn on USB debugging, plug in, and it appears in the device dropdown.

The files that matter

  • app/src/main/java/.../MainActivity.kt — entry point; your Compose UI starts in setContent { }
  • app/build.gradle.ktsthe one you'll edit: dependencies, SDK versions, plugins
  • build.gradle.kts (project root) — plugin versions; rarely touched
  • app/src/main/AndroidManifest.xml — permissions, activities, app metadata
  • gradle/libs.versions.toml — version catalog where dependency versions live in modern templates

Adding a dependency

In app/build.gradle.kts inside dependencies { }:

implementation("io.coil-kt:coil-compose:2.6.0")

Then click Sync Now in the banner. Nothing exists until you sync.

Common gotchas

  • Everything is red / unresolved: Gradle sync failed or hasn't run — check the Build window, then File → Sync Project with Gradle Files.
  • Emulator won't start: virtualization is off in BIOS, or another hypervisor is fighting it. On Windows, check that Windows Hypervisor Platform is enabled.
  • "SDK location not found": open File → Settings → Android SDK and let Android Studio set the path.
  • Stuck on a weird build error: Build → Clean Project, then rebuild. The classic.