Android Application Project Structure
An android app is collection of many files and folders arranged in a particular file structure. if you use Android Studio to develop Android Application this is setup is made automatically by Android Studio for you. Android Studio also provides a feature to display the project files in different types Such as Project,Android, Packages, Project Files, etc. Most common type are Project and Android view to understand easily we can use Project view
In Above screen shot we can see different types of file and folders. you can browse through it and look for what is included. The mainly used files and folders are denoted by number these are
1-Java Files : These are the activity files for your application
we can find this file in app/src/main/java/
2-drawable : This folder include Images,Icons this not include the application icon file
we can find this file in app/src/main/res/drawble/
3-layout : The layout files that we are set to activity files
we can find this file in app/src/main/res/layout/
4-mipmap : This folders include different density Application icons these are automatically set when this app is installed in a device.
we can find this file in app/src/main/res/mipmap-(density)
5-values : This folder include color.xml (used to store color resources), strings.xml(used to store string resources), styles.xml(used to store different app styles) in default. also we can add dimensions and other files in this file
we can find this file in app/src/main/res/mipmap-(density)
6-Manifest.xml : This is the configure file for your application
we can find this file in app/src/main/AndroidManifest.xml
Mainly we divide the files into 5 there are
- Java & XML source files
These are the activity and layout files for your application
- Android-generated Java Files
These are some extra Java files you don’t need to touch or care about these are auto generated by Android Studio. This section include a main file called
R.java
It is a java class file every android app contain this is used to keep track of resources in the app. This is a auto generated file.Like any other auto generated file, if you delete this file android create this file again automatically
we can find this file in app/build/generated/source/r/debug/(packagename)/R.java
- Resource Files
These files include default image files for application icon, styles for your app, string resources, color resources, etc
- Android Libraries
Android library files that is relevant to your minimum SDK version that you specified when create the project, these libraries also automatically include by Android Studio
- Configuration Files
This file describes what is included in your app and also describes how it should run