Open Android Studio and create a new project:
- Click New Project
- Select Empty Activity (this template uses Jetpack Compose)
- Set Name to
MyApp - Set Package name to
com.example.myapp - Set Language to Kotlin
- Set Minimum SDK to API 24 (covers ~98% of devices)
- Click Finish
Android Studio downloads Gradle and builds the project. The first build takes a few minutes.
Diagram: The key files and folders of an Android project.
flowchart TD
Root["project-root/"] --> Set["settings.gradle.kts"]
Root --> GradleTop["build.gradle.kts (project)"]
Root --> App["app/"]
App --> BuildApp["build.gradle.kts (module)"]
App --> Src["src/main/"]
Src --> Manifest["AndroidManifest.xml"]
Src --> Kotlin["java/com/example/myapp/"]
Kotlin --> MainActivity["MainActivity.kt"]
Src --> Res["res/"]
Res --> Theme["themes/"]
Res --> Values["values/ (strings, colors)"]
| Path | Purpose |
|---|---|
settings.gradle.kts |
Lists modules and plugin/version management |
build.gradle.kts (project) |
Plugins and SDK locations |
app/build.gradle.kts |
Module dependencies, minSdk, targetSdk, app id |
AndroidManifest.xml |
Declares the app, activities, and permissions |
MainActivity.kt |
The entry activity, hosts your Compose UI |
res/ |
Themes, strings, colors, images |
// app/build.gradle.kts
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose) // Compose compiler (K2)
}
android {
namespace = "com.example.myapp"
compileSdk = 35
defaultConfig {
applicationId = "com.example.myapp"
minSdk = 24
targetSdk = 35
versionCode = 1
versionName = "1.0"
}
buildFeatures {
compose = true
}
}
dependencies {
val composeBom = platform("androidx.compose:compose-bom:2025.06.01")
implementation(composeBom)
implementation("androidx.activity:activity-compose:1.10.1")
implementation("androidx.compose.material3:material3")
}Key terms:
minSdk = 24— the oldest Android version the app supportstargetSdk = 35— the Android version the app targets (API 35 = Android 15)compileSdk = 35— the SDK used to compile (must be >=targetSdk)
<!-- AndroidManifest.xml -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="MyApp"
android:theme="@style/Theme.MyApp">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>The <intent-filter> with MAIN and LAUNCHER marks MainActivity as the screen shown when the user taps the app icon.
- Open the Device Manager and create a Pixel 7 emulator (API 35)
- Click the green Run button (or press
Control + R) - Android Studio builds, installs, and launches the app
You should see the default Compose template — a greeting text centered on screen.
// Emulator output:
// Hello Android!
Create a new project, then change the greeting in MainActivity.kt to show your own name. Run it on the emulator and confirm your name appears on screen.