Android Project Structure

After creating new project,(How to create new project in android?) Android Studio displays your project files in the Android view. Android Studio show project directory structure in different formats. Like Android View, Project View and others.

Android View

This view does not reflect the actual file hierarchy on disk, but is organized by modules and file types to simplify navigation between key source files of your project, hiding certain files or directories that are not commonly used. Within each Android app module, files are shown in the following major three groups:

android view – directory structure
  • app
    • manifests : Contains AndroidManifest.xml file
    • java : Contains Java Source code files , separated by package names
    • res : Contains all non-code resources, such as XML layouts, UI strings, and bitmap images, divided into corresponding sub-directories.
      • drawable: Contains all image resource files and background.xml files
      • layout : Contains all GUI Layout.xml files for application activities and other layout files.
      • mipmaps: This folder contains launcher.xml files to define icons which are used to show on the home screen. It contains different density type of icons depends upon the size of the device such as hdpi, mdpi, xhdpi.
      • values : Contains all .XML files related datas. Like String.xml , colour.xml, themes.xml, Menu.xml etc.
  • Gradle Scripts : Show the gradle related files and directories. Like
    • build.gradle (module) : This defines the module-specific build configurations.
    • build.gradle (project) : This defines your build configuration that apply to all modules.

Android Project View:

Android Project View shows the actual file structure of the project including all files hidden from the Android view, select Project from the dropdown at the top of the Project window. When you select Project view, you can see a lot more files and directories. Some of the important directories are listed below:

android project structure
android project structure

List of Directories in project view :

  • app : contains all application level files and directories
  • src : Contains all resources related to application like java files , layout files, image files, values and etc.
    • main : Contains all java resource files with package names
    • res : Contains all non-code resources, such as XML layouts, UI strings, and bitmap images, divided into corresponding sub-directories.
      • drawable: Contains all image resource files and background.xml files
      • layout : Contains all GUI Layout.xml files for application activities and other layout files.
      • mipmaps: This folder contains launcher.xml files to define icons which are used to show on the home screen. It contains different density type of icons depends upon the size of the device such as hdpi, mdpi, xhdpi.
      • values : Contains all .XML files related datas. Like String.xml , colour.xml, themes.xml, Menu.xml etc.
      • AndroidManifest.xml file
  • gradle: Show the gradle related files and directories. Like
    • build.gradle (module) : This defines the module-specific build configurations.
    • build.gradle (project) : This defines your build configuration that apply to all modules.

Related posts

One Thought to “Android Project Structure”