Back to Roadmap
5:00

Understanding Android Project Structure

Breaking down every important folder and file inside an Android application

5 MIN READ VERIFIED CURRICULUM

When you create your first Android project in Android Studio, the number of folders and files can feel overwhelming. But every part of the project structure exists for a specific purpose.

Understanding the Android project structure is one of the most important beginner skills because almost every Android task involves navigating these folders correctly.

High Level Android Project Structure

MyApplication/
 ├── app/
 ├── gradle/
 ├── build.gradle
 ├── settings.gradle
 ├── gradle.properties
 └── local.properties
text

The app module contains your actual Android application code, while Gradle-related files manage dependencies, builds, and project configuration.

The app Module

The app module is the heart of your Android application. Almost everything developers work on daily lives inside this module.

app/
 ├── manifests/
 ├── java/
 ├── res/
 └── build.gradle
text

manifests Folder

This folder contains the AndroidManifest.xml file. The manifest acts like the identity card of your application.

<manifest>
    <application
        android:label="MyApp">

        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>
</manifest>
xml

The manifest declares activities, permissions, services, broadcast receivers, app icons, themes, and launch configurations.

java Folder

The java folder contains your Kotlin or Java source code. Even Kotlin files are placed here for historical reasons.

java/
 ├── com.example.app/
 │    ├── MainActivity.kt
 │    ├── ui/
 │    ├── data/
 │    ├── domain/
 │    └── network/
text

As applications grow, developers organize code into packages like ui, data, domain, database, network, repository, and viewmodel.

res Folder

The res folder stores all non-code resources used by the application.

res/
 ├── layout/
 ├── drawable/
 ├── mipmap/
 ├── values/
 ├── color/
 └── font/
text

layout Folder

The layout folder contains XML UI files for screens and reusable UI components.

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:text="Hello Android" />

</LinearLayout>
xml

drawable Folder

The drawable folder contains images, vector assets, shapes, gradients, and custom drawable resources.

mipmap Folder

The mipmap folder stores launcher icons optimized for different device densities.

values Folder

The values folder contains reusable constants such as colors, strings, themes, dimensions, and styles.

<resources>
    <string name="app_name">MyApplication</string>
</resources>
xml

Separating strings and colors into resources improves maintainability and localization support.

build.gradle File

Each module contains its own build.gradle file which controls dependencies, SDK versions, plugins, and build configurations.

dependencies {
    implementation("androidx.core:core-ktx:1.12.0")
    implementation("androidx.compose.ui:ui")
}
kotlin

Whenever you add libraries like Retrofit, Hilt, Room, or Compose, you usually configure them here.

Gradle Scripts

Gradle scripts define how your project is built. They manage dependencies, signing configurations, product flavors, build variants, and optimization rules.

Project Level Gradle → Global project settings
App Level Gradle → App-specific configuration
text

Generated Folders

Android Studio automatically generates folders like build/ during compilation. These contain compiled code, APKs, caches, and generated resources.

Developers usually do not edit generated files directly because Android rebuilds them automatically.

Modern Android Folder Structures

Large production apps often organize projects using clean architecture principles.

com.example.app
 ├── data/
 ├── domain/
 ├── presentation/
 ├── di/
 ├── network/
 └── database/
text

This separation makes apps easier to test, scale, and maintain as engineering teams grow.

Why Project Structure Matters

Good project organization becomes extremely important in large applications with hundreds of screens and developers.

Senior Android engineers spend significant time designing scalable folder structures because poor organization eventually slows down development speed, onboarding, testing, and debugging.