Project Structure & Gradle

June 02, 2026 1 min read

Knowing where things live saves hours. An Android project has a predictable structure controlled by Gradle.

Key folders & files

  • app/src/main/java — your Kotlin code.
  • app/src/main/res — resources: layout/ (XML screens), drawable/ (images), values/ (strings, colors, themes).
  • AndroidManifest.xml — declares your app's screens, permissions and entry point.
  • build.gradle (app) — dependencies, SDK versions, build config.

The manifest

<manifest ...>
  <uses-permission android:name="android.permission.INTERNET"/>
  <application android:label="@string/app_name">
    <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>

Adding a dependency with Gradle

// app/build.gradle.kts
dependencies {
    implementation("com.squareup.retrofit2:retrofit:2.11.0")
}
// then click 'Sync Now'
Common mistake: Forgetting to add a permission to the manifest (e.g. INTERNET) makes features silently fail at runtime.

Summary

You can now navigate any Android project, edit the manifest, manage resources, and add libraries through Gradle.