Android App Folder Structure
Before starting development its very important to understand about file and folder structure of Android Studio.
Our main folder is app/src/main/ but right now we see useful content only. Let’s start with app/src/main
This the folder where we works most. It’s contain below sub folders.
- main/java/ : This is the folder where all our .java files where stored. We have to maintain all our packages and java files.
- main/res/ : This folder contain other sub folder.
- res/drawable/ : In this folder there is a all type of bitmap files. In short images. 9-patch image, other drawable shape in this folder. There is a many type of folders like drawable, drawable-hdpi, drawable-mdpi, drawable-ldpi, drawable-xhdpi, drawable-xxhdpi, drawable-xxxhdpi. This folders are used for store resolution wise all resource.
- res/layout/ : This folder contains the layout resources. In android all screen view is loaded in XML file as a resource. This is the most important in UI design in android.
- res/menu/ : This folder is used for application menu.
- res/mipmap/ : This is new added folder for app launcher icons which is show on home screen. Device take icon from folder as per density.
- res/values/ : This folder contain basic resource like string, integer, dimension, style, colors, atts.
- res/xml/ : from the developer site : Used for miscellaneous XML files that configure application components.
- res/row/ : This folder also used for some arbitrary raw asset files. Such like MP3 song or media files.
- main/AndroidManifest.xml : As a my point of view this file is a heart of Application. This file describes the functionality and requirement of application to Android. It’s all about application like: how many activity,what which activity perform, service, receiver, content provider, how many permission we need, what device features are required, least API level and more.
- main/assets : This folder contain all assets file like .txt file or some fonts and etc. This managed bye URI and read files as a stream of bytes using the AssetManager.
- main/build.gradle : As per developer site : Customizable properties for the build system. You can edit this file to override default build settings used by the manifest file and also set the location of your keystore and key alias so that the build tools can sign your application when building in release mode. This file is integral to the project, so maintain it in a source revision control system.
- main/proguard-rules.pro : Used for the ProGuard settings.
This is the all content of app/main folder. Now we just take overview of our root directory files and folder.
- .gradle/ : Downloaded gradles file and plugin.
- .idea/ : Directory for IntelliJ IDEA settings.
- build/ : This directory stores the build output for all project modules.
- gradle/ : This folder contains the gradler-wrapper files.
- build.gradle : Customizable properties for the build system. You can edit this file to specify the default build settings used by the application modules and also set the location of your keystore and key alias so that the build tools can sign your application when building in release mode. This file is integral to the project, so maintain it in a source revision control system.
- gradle.properties : Used for project-wide Gradle settings.
- settings.gradle : Used for specifies the sub-projects to build.
Now its time to develop your first application. But before that take little rest and go to my next post for Hello Android. See you soon…….!!