Directory Structure of an Android Application

Posted By on March 23, 2016

Download PDF
Sample Android App Using layouts and view interaction
Execution Control Flow of an Android Application

Before going to discuss “HelloWorld” application from code prospective, We need to know directory structure of an android application. When we create a new android project from eclipse editor, we can see there are lots of directories created for android applications. Let’s us understand these directories. Let’s start from the top most directory is src directory.

SRC Directory

The src Directory contains the java files inside package.

gen Directory

The gen directory contains folder that are generated for us by the toolset. one of the best thing you will find in gen directory is file. file update automatically by the system whenever you add or remove the design object or anything. in straight forward way whatever you add or remove from your project will be update in file.

Android 2.2 or X.X

This folder is associate with the SDK version this is the thing that we have to configure when we create new project of android application.


the assets folder provides repository for your resource which are using by your android application. for eg if your android application has sound effect then you can put those sound files in this folder but you can’t put image files in this folder because we have another folder for images like stuff.


Every program gets compiled and generates binary files same way android program also gets compiled and generate binary files. Android bin folder contains the compiled binary files.


the res folder doesn’t contain any files but it is one of the most important directory in android application. let us see what kind of directory res folder has.


Drawable folder contains images. there are three kind of screen density. you can specify same three images for different screen density. for eg res/drawable-hdpi contains all your image resources for high-resolution devices.   you don’t need to specify which density images to pick when but operating system will choose it at run time.


the layout folder is where you put your main.xml file. all design resources are stored in this folder.


values folder contains string resource. mostly its in key value pair. some common file is strings.xml


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.

Sample Android App Using layouts and view interaction
Execution Control Flow of an Android Application

Download PDF

Posted by Akash Kurup

Founder and C.E.O, World4Engineers Educationist and Entrepreneur by passion. Orator and blogger by hobby