Directory structure of an android application

When we create new android project in  eclipse editor we found that 
there are many directories created for android application
which are known as directory structure 
1. src :
The src Directory  is first tree branch of root directory
which contain packages and .java files inside package.
2. gen directory :
The gen directory contains folder that are generated for us by the tool set.
like R.java file.
R.java file update automatically by the system whenever we modify the design object or anything.
in straight forward way whatever we add or remove from our project will be update in R.java file.
3. Api libraries :
when we develop new android application Api library is auto created with whole directory but if we want to change 
i mean if we want to create our own api library then we have to follow below steps:
A. In the Package Explorer, right-click the dependent project and select Properties.
B. In the Properties window, select the "Android" properties group at left and locate the Library properties at right.
C. Click Add to open the Project Selection dialog.
D. From the list of available library projects, select a project and click OK.

4. android dependency :
Android Dependencies is a virtual folder where Eclipse shows what JAR files the project depends on
Do not delete that folder.
we will destroy your project.
1.Right click on the destroyed project
2.Select "Android Tools > Fix Project Properties" in the drop-down
5. bin :
when we compile any android program  generate binary files. these files goes to bin folder/directory.
6. assets :
the assets folder provides repository for our resource which are using by our android application.
for e.g. if our android application has animation effect
then we can put those animation files in this folder but
you can't put sound files in this folder because we have another folder for sound files.
7. res :
this is main part of directory structure because it has many sub directories
7.1 drawable :
drawable contain all type images and this divide into 4 type
7.1.1 drawable hdpi :
this one contains all image resources for high-resolution devices.
7.1.2 drawable mdpi :  
this one contains all image resources for medium-resolution devices.
7.1.3 drawable ldpi:
this one contains all image resources for low-resolution devices.
7.1.4 drawable xdpi :
this one contains all image resources for extra-resolution devices.
7.2 Layout :
the layout directory is where we put our 'main.xml' file.
all design resources are stored in this folder.
7.3 values :
values directory contains string resource. mostly its in key value pair. some common file is strings.xml, color.xml,dimension.xml
8. manifest.xml :
this is a abstract description or overall profile of any application 
The manifest file is responsible for providing essential information to the operating system about a   particular application.
for e.g. used to specify the default activity to launch.
      
  for e.g.
<manifest>
<uses-sdk mintargetsdk='9'
 targetsdk='17'/>
<uses-permission/>
<uses-feature  />
<uses-configuration/>
<application>
< activity>
<service>
<provider>
< receiver >
<uses-library>
</application>
</manifest>

Android-Directory-Structure.jpg
Ebook Download
View all
Learn
View all