In this blog, we will see the Android Project Structure and its key concepts. When you create a new Android project, it will automatically create a lot of modules and files. A New Project automatically opens in the Android Project View or we can select Project Structure manually from the Top menu, choose File->Project mode.
Let’s look at their functions and meaning.
0. Demoo D:\android project\Demoo: This is the main or root directory of your project.
- .gradle: You can find the entire project-related files or tasks in this folder. You can also delete this folder but it will be recreated when you will build that project again. Android studio users basically used this to build.APK.
- .idea: In the .idea folder, all the settings of your IDE (Development Environment) are stored. It stores the project related settings or meta-data so that your IDE can visualize what is going on such as, navigation history, currently or previously selected configuration, etc.
- app: All app-related data are stored in this folder. Your codes, UIs, assets, etc. Without this folder, your project is just useless.
- gradle: Gradle is the storage of the Android Project. It is the advanced toolkit of the Android Studio. It contains all the resources, it is the advanced tool to manage, automate the build system. Also able to build the custom configuration.
- .gitignore: you can include files in this folder that you want to exclude from the VCS (Version Control System).
- build.gradle: you can add configuration settings in this folder. This will be common for all the modules or directories of the project. But this is totally different from the app/build.gradle.
- Demoo.iml: this is a module file that is created by IntelliJ IDEA, an IDE used to develop the Java Applications. In this folder, you can find all the plugins, components, java files, dependencies, module files, etc.
- gradle.properties: store data and used them as build variables. This file is basically used for Java projects, so it is also used for android projects. It has a simple key-value data structure. Example: KEY_1 = VALUE_1 KEY_2 = VALUE_2
- gradlew: Basically used as an updater. When you required any new plugins or want to update gradle version, this file will help.
- gradlew.bat: batch file, it is a script required for Windows.
- local.properties: it contains all your local information, not VCS information. Like the location of your Android SDK path. If you delete this file locally, then the Android studio will re-create this file automatically.
- settings.gradle: Gradle generates this file. When Android creating the Settings, settings.build file is created. You can define subprojects in your settings.gradle file.
- External Libraries: It is backward-compatible which means it supports the library files of the Android APIs.
- Scratches and Console: Allow you to run and debug the code quickly with the support of file operation also used to store the scratch files.