Android Project Folder Structure

This section describes the Android project folder structure, which has a source folder, a resource folder, a generated-code folder, and a binary folder.

In this tutorial, let's look at the Android application project folder structure using the HelloAndroid application as an example. If you have not created the project yet, run the following command now:

C:\herong>\local\android-sdk-windows\tools\android create project \
   -k com.herongyang -a HelloAndroid -t 2 -p .\HelloAndroid

Now open the project folder \herong\HelloAndroid using the "dir /s \herong\HelloAndroid" command. You will see the following folder structure:

C:\herong\HelloAndroid
   AndroidManifest.xml
   ant.properties
   bin - Binary folder to hold build output 
      build.prop
      classes - Binary class files
         com
            herongyang
               BuildConfig.class
               HelloAndroid.class
               R$attr.class
               R$drawable.class
               R$layout.class - Layout resource file
               R$string.class
               R.class
      classes.dex
      classes.dex.d
      HelloAndroid-debug-unaligned.apk
      HelloAndroid-debug-unaligned.apk.d
      HelloAndroid-debug.apk
      HelloAndroid.ap_
      HelloAndroid.ap_.d
      jarlist.cache
      res
         drawable-hdpi - High resolution icon
         	  ic_launcher.png
         drawable-ldpi - Low resolution icon
            ic_launcher.png
         drawable-mdpi - Medium resolution icon
            ic_launcher.png
   build.xml
   gen
      com
         herongyang
            BuildConfig.java
            R.java
   libs - Empty folder
   local.properties
   proguard-project.txt
   project.properties
   res
      drawable-hdpi - High resolution icon
      	  ic_launcher.png
      drawable-ldpi - Low resolution icon
         ic_launcher.png
      drawable-mdpi - Medium resolution icon
         ic_launcher.png
      layout - Layout resource files
         main.xml
      values
         strings.xml - String resource file
   src
      com
         herongyang
            HelloAndroid.java

Some detailed explanations of key folders and files in an Android project folder structure based on the Android document:

Last update: 2015.

Table of Contents

 About This Book

 Installing JDK 1.8 on Windows System

 Installation of Android SDK R24 and Emulator

 Installing Apache Ant 1.9 on Windows System

 Developing First Android Application - HelloAndroid

 Android Application Package (APK) Files

 Android Debug Bridge (adb) Tool

 Android File Systems

 Android 4.0.3 File Systems

 AboutAndroid - Application to Retrieve System Information

 android.app.Activity Class and Activity Lifecycle

 View Objects and Layout Resource Files

 Using "adb logcat" Command for Debugging

Build Process and Package File Content

 "android create project" Command Options

Android Project Folder Structure

 Android Application Project Build Process

 Project Build Process Done by "ant debug" Command

 Detailed Output of "ant -verbose debug" Command

 Output of "ant -verbose debug" - Android SDK R17

 "aapt" - Android Asset Packaging Tool

 "aapt package" Command - Resource Code Generation

 "javac" - Java Compilation Command

 "dx.bat --dex" Command - Converting .class Files into .dex File

 "apkbuilder" Command - Packaging and Signing .apk File

 "zipalign" Command - Aligning File Locations in .apk Package

 "aapt dump" Command - Printing Contents of .apk Package

 META-INF Files - Digests, Signature and Certificate

 Building Your Own Web Browser

 Android Command Line Shell

 Samsung Galaxy Tab 3 Mini Tablet

 USB Debugging Applications on Samsung Tablet

 Android Tablet - LG-V905R

 USB Debugging Applications on LG-V905R Tablet

 Android Phone - LG-P925g

 USB Debugging Applications on LG-P925g Phone

 Outdated Tutorials

 References

 PDF Printing Version