Android Tutorial
Software Setup and Configuration
Android Studio
File Structure
Components
Core Topics
Layout
View
Button
Intent and Intent Filters
Toast
RecyclerView
Fragments
Adapters
Other UI Component
Image Loading Libraries
Date and Time
Material Design
Bars
Working with Google Maps
Chart
Animation
Database
Advance Android
Jetpack
Architecture
App Publish
App Monetization
When you create an Android app using Android Studio, the IDE generates a standard directory structure that organizes your code, resources, and configurations. Here's a brief overview of the typical file structure of an Android app:
app/
: This is the root directory of your app module.
manifests/
: Contains the AndroidManifest.xml
file, which defines app metadata, permissions, components (activities, services, receivers, providers), etc.
java/
: Contains the Java or Kotlin source code files of your app, organized by package names.
com.example.myapp/
: This directory (or a similar one depending on your app's package name) contains the main source files of your app. This is where your activities, fragments, services, and other app-specific logic reside.res/
: Contains resources for your app, organized by type.
drawable/
: For image files (like .png
, .jpg
, .xml
, etc.)
layout/
: XML files defining UI layouts for activities, fragments, views, etc.
mipmap/
: For launcher icons at different resolutions.
values/
: XML files defining values like strings (strings.xml
), dimensions (dimens.xml
), colors (colors.xml
), and styles (styles.xml
).
menu/
: XML files defining app menus.
raw/
: For raw resource files like audio.
anim/
& animator/
: For XML files defining animations.
xml/
: For other XML files that can be read at runtime.
build.gradle
: The build configuration file for the app module. This is where you define dependencies, plugins, and other build-related settings.
.gradle/
: Contains Gradle's cache and configuration files.
.idea/
: Contains IDE-specific configuration files for Android Studio. Typically, these files aren't version-controlled.
gradle/
: Contains the Gradle wrapper, which ensures that the build tool version used is consistent among developers and environments.
libs/
: Contains external libraries or .jar
files that you might need to include in your project.
gradlew
and gradlew.bat
: Gradle wrapper executable for Unix-like and Windows operating systems, respectively.
build.gradle
(at the project root): The build configuration file for the whole project. Here you can define build settings that apply to all modules of the project.
settings.gradle
: Lists all the modules in your project.
local.properties
: Contains local settings for your development environment, like the path to the Android SDK. This file shouldn't be version-controlled.
.gitignore
: If you're using Git for version control, this file lists the files/directories that should be ignored by Git.
Remember, the above structure can vary, especially if you introduce new components, use a different build system, or structure your project differently (e.g., when using multi-module builds). The above is the default structure created by Android Studio for a basic app module.