Saturday 23 May 2015

Android Directory And Application’s Folder Structure

No comments
Hello Friends,It is very important to understand the files and directories structure of the Android Application,Before developing application in the Eclipse. Eclipse.lets start folder structure of Eclipse.

Follow Picture shown like below:


First is Project folder name is "hello" its given when created application.this contain various folder. it divided in three type.

  1:Source File
  2:Resource File
  3:Manifest File

In this chapter i provided basic level information about android file/folder structure May be its useful for you.

 1: Source File
src/: Contains the all source files those are needed in project. For example MainActivity.java file generated by ADT stored in this directory under the package name “com.example.hello” .You can add more packages for your application com.example.slide,adm.EmprovantionTechsol.appname etc.

 2:Resource File


gen/: This is where Android's build tools will place source code that they generate.it contain R.java and BuildConfig.java 

BuildConfig.java generate a class called BuildConfig containing a it is generated automatically by ADT.


R.java This is an automatically generated class that we can use to reference resources in our project. it contains the text and the UI elements id.We should not try to modify this class manually.


assets/: folder that holds other static files e.g.help.html,help.txt etc. those data you want to packaged with apk(Android application package) file.


bin/: In Eclipse, ADT plugin incrementally builds our project as we make changes in source code. Android allow .apk file, that automatically generated into bin folder of the project.


lib/: It contain required library which is use in android project e.g.android-support-v4.jar,android-support-v7.jar and more.

res/: contains all the resource like graphical element, string and layout of application exists one of the sub folder of the res. The images, string, layout file should be separate.

Drawable/: folder contains the images those are used in your application. E.g “ic_launcher.png” for app lunch as well as app background or many other requirement...etc.

There are many drawable folders drawable-ldpi, drawable-mdpi, drawable-hdpi,drawable-xhdpi, and drawable-xxhdpi.which contain the images for different density and screen size. 
The Android system picks the image from folder that matched the density or screen of the device otherwise it picks default folder.

Layout/: folder contains the layout resources. XML file is allow to create GUI for app design.its allow to design for multi-pal screen resolution.

Menu/: it contains menu resource to define Menu items using XML.

Values/: contains the resources of different type such as string, dimensions, integer and other values.it contain different values for differend e.g valuse-sw600dp.

project.properties: Property files used by the Ant build script.that auto generated by ADT.We should not try to modify this class manually.

 3:Manifest File
AndroidManifest.xml: It is the most important file in the android application and every application must have an AndroidManifest.xml. this file contain a various Attribute, application toggle, Permission, Instrumentation. 







No comments :

Post a Comment

Follow me Share