Android Project Structure -Part 1

Back in 2012 i was learning android those days we used eclipse as main IDE. The project was slightly different from Android Studio. There are many changes happened took over the major change was build system previously it was Ant and now Gradle. 

In eclipse developer doesn’t have any control over the build but in gradle developer control things like which third party lib has to compile and which has to ignore.

Now let’s look into structure of the project.

Project_Sturture.png

app : is your app where all the project files are included.

  • manifests: is a folder where AndroidManifest.xml  is present.
    AndroidManifest.xml : is a xml file which acts as configuration file for the entire application, which contains package name on which playstore identifies the your application, contains permissions such as android.permission.INTERNET (if your application is accessing internet). And mainly all of your activities should be registered here if not ActivityNotFoundException will thrown when you call startActvitiy(intent).
  • java: where all of your activities and java classes are placed if manifest is heart java classes are brain to application.Which you can also have junit test files which are placed under (test) we will talk about it later.
  • res: is folder where all of your application resources are placed such as images,xml,assests(mp3,mp4 files),values.
    drawables: It is a folder where you place animations, png files, layout transitions etc.,
    layout: All of your UI xml files are displayed here.
    mipmap: Your app’s launcher icon should be placed here.It is exculsively for launcher icons.
    values: This folder contains strings.xml where all of your app’s strings are placed which is mostly used for internatlization and to make any string global for all the classes, your customized colors and diemensions for different orienation screens.

Gradle : Simply it is a build system.

Advertisements