What is actually inside an Android project — the manifest, resources, and Gradle build files. Understand how Gradle turns your Kotlin and resources into an installable APK, and how to add a dependency.
An Android app is more than Kotlin files: it is code, resources (layouts, strings, images), and a manifest that declares the app to the system, all assembled by the Gradle build tool. Knowing where each piece lives — code under java/kotlin, resources under res/, the manifest at the root of the module — orients you before you write anything.
app/
├── src/main/
│ ├── java/com/example/app/ your Kotlin source (Activities, etc.)
│ ├── res/ resources, referenced by ID not path
│ │ ├── drawable/ images / vector assets
│ │ ├── values/ strings.xml, colors.xml, themes.xml
│ │ └── mipmap/ launcher icons
│ └── AndroidManifest.xml declares the app to the OS
├── build.gradle.kts MODULE build config (deps, SDK versions)
└── ...
settings.gradle.kts lists the modules in the project
Code + resources + manifest, assembled by Gradle into an APK/AAB.The AndroidManifest.xml is how your app tells the operating system what it is: its components (which screens exist), the permissions it needs, its minimum Android version, and which Activity launches first. The system reads it before running any code, so a component that is not declared here effectively does not exist to Android.
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- permissions the app requests -->
<uses-permission android:name="android.permission.INTERNET" />
<application android:label="MyApp" android:icon="@mipmap/ic_launcher">
<!-- every Activity must be declared here -->
<activity android:name=".MainActivity" android:exported="true">
<intent-filter>
<!-- this marks MainActivity as the app's launch screen -->
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>Gradle compiles your code, processes resources, merges manifests, and packages everything into an APK (for install) or AAB (for the Play Store). You configure it in build.gradle.kts: the SDK versions you target, and — most commonly — the libraries your app depends on. Understanding this file is essential because adding almost any capability starts with a Gradle dependency.
// app/build.gradle.kts — the module's build configuration
android {
namespace = "com.example.app"
compileSdk = 34 // build against Android 14 APIs
defaultConfig {
minSdk = 24 // runs on Android 7.0 and up
targetSdk = 34
versionCode = 1 // integer, bumped every release
versionName = "1.0" // user-visible version string
}
}
dependencies {
// add a library -> one line here, then Gradle downloads + links it
implementation("androidx.core:core-ktx:1.13.1")
implementation("com.squareup.retrofit2:retrofit:2.11.0")
}Android keeps user-facing content — strings, colors, dimensions, images — out of code in the res/ folder, and generates an R class so you reference each resource by a stable ID. This separation enables localization (swap strings.xml per language), theming, and different assets per screen size without touching code. Referencing resources by ID rather than hardcoding is a core Android habit.
<!-- res/values/strings.xml -->
<resources>
<string name="app_name">MyApp</string>
<string name="greeting">Hello, %1$s!</string>
</resources>
<!-- reference in Kotlin via the generated R class: -->
<!-- val name = getString(R.string.app_name) -->
<!-- val msg = getString(R.string.greeting, "Ada") // "Hello, Ada!" -->
<!-- referencing by ID (not hardcoding) enables localization + theming:
add res/values-es/strings.xml and the app is Spanish, no code change. -->