Programming and Personal Development

Android Project structure

  • /bin: Contains the compiled java class (.class) files, the dalvik executables (.dex) files etc
  • /gen: Contains the files generated by the android build tools (eg: R.java)
  • /lib: Contains third party libraries (jars) used by the application.
  • /res: Contains resources used by the application like icons, layouts, localized strings etc. Android build tools generate Ids (in the R.java file)  for each resource placed inside the resource folder. Contains the following sub folders,
    • /res/drawable: Contains images with further subfolders for high-density/medium-density and low-density screens.
    • /res/layout: Contains xml files representing the UI layouts of your application.
    • /res/menu: Contains xml files representing the application menus.
    • /res/values: Contains xml files representing externalized strings, colors, styles, dimensions etc.
    • /res/xml: Contains additional xml files need by the application
    • /res/color: Contains additional color resources that adapt to view states
    • /res/raw: Other files needed by your application in their raw form. eg: audio file.
  • /assets: Just like “/res” directory,  you can place static resources needed by the application. The difference is, the  build tools do not generate the Ids for files inside the assets directory.
  • /src : Contains the source code for the application

In addition to the folders above  there are few files worth paying attention to:

  • AndroidManifest.xml : An xml file containing important application details like the name,the activities rendered, the services used etc. This information is needed for the  Android system to run the application code.
  • proguard.cfg: It’s a file for integrating with proguard, a tool that shrinks the size of the application package (.apk) file  and  obfuscates the code to make it harder to reverse engineer.
Web Analytics