Directory Structure of Android

Directory Structure of Android :
The arrangement of folders in any android application is known as directory structure of android.
The directory structure of android is given below :




Directory src :
This directory contains the source code of any application with ".java" extension.

Directory gen :
This directory contains the auto generated R.java file which is reusable java file.
R.java is also know as reusable java class. It is an auto generated java file that means we can not modify this class manually or by hand.

This java file is generated by AAPT(Android Asset Packaging Tools). This tool receives resource data as an input and generate R.java file as an output.
R.java file works as a mediator file between activities and xml components defined inside resource.
R.java file contains some static final inner classes like drawable, layout, id, etc...

Directory res :
 The res directory is known as resource directory. It contains drawable-ldpi, drawable-mdpi, drawable-hdpi, these drawable directory is contains the image resources like icon and other images with .png extension.
Directory layout contains xml files (User interface designed by developer)  the user interface is designed using xml code in android.

Directory value :
It is used to put data in form of key value pair.

AndroidManifest.xml
It is a meta data file which is used by ARE(Android Runtime Environment) to launch application.

0 Comments:

Post a Comment