0% found this document useful (0 votes)
7 views

Android Directory

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Android Directory

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Android directory structure is essential for effective app development,

debugging, and maintenance.

Here’s an overview of the primary directories in an Android project:

1. Root Directory

The root directory contains the main configuration files and project-level
settings:

 build.gradle: Defines project-level build configurations.


 settings.gradle: Specifies the project's modules.

2. app/src/main/

This is where most of your application code and resources are located.

 java/: Contains Java/Kotlin source files.


 res/: Holds app resources, such as layouts, drawables, and strings.
o drawable/: Stores drawable resources (images, vectors).
o layout/: Contains XML layout files.
o values/: Houses XML files for strings, colors, dimensions, and
styles.
o mipmap/: Used for app launcher icons.
o menu/: Contains menu XML files.
 AndroidManifest.xml: Describes essential information about your app,
such as its components and permissions.

3. app/build/

Generated files during the build process are stored here.


 outputs/: Contains APKs, mapping files, and other build outputs.
 intermediates/: Holds intermediate build files.

4. app/src/test/

Contains unit test code that runs on the local JVM.

 java/: Java/Kotlin source files for unit tests.

5. app/src/androidTest/

Contains instrumented test code that runs on an Android device or emulator.

 java/: Java/Kotlin source files for instrumented tests.

6. app/libs/

Stores external libraries in JAR or AAR format that are not available in online
repositories.

7. gradle/

Includes files related to the Gradle build system.

 gradle-wrapper.properties: Configures the Gradle wrapper version.

8. .gradle/

Contains Gradle-related data, caches, and temporary files.

9. .idea/

Holds project-specific settings for the IntelliJ IDEA-based Android Studio IDE.

10. build/
A top-level directory generated by the build system, containing outputs and
intermediate files.

11. .gitignore

Specifies files and directories to be ignored by Git.

12. README.md

Provides an overview or documentation of the project.

Example Directory Structure:

css
Copy code
ProjectRoot/
├── app/
│ ├── build/
│ ├── libs/
│ ├── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ ├── res/
│ │ │ │ ├── drawable/
│ │ │ │ ├── layout/
│ │ │ │ ├── values/
│ │ │ │ ├── mipmap/
│ │ │ │ ├── menu/
│ │ │ │ └── ...
│ │ │ ├── AndroidManifest.xml
│ │ ├── test/
│ │ │ ├── java/
│ │ ├── androidTest/
│ │ │ ├── java/
├── build/
├── .gradle/
├── gradle/
├── .idea/
├── build.gradle
├── settings.gradle
├── .gitignore
├── README.md

This structure ensures a well-organized project, making it easier to navigate and


manage different components of your Android application.

You might also like