Project Architecture
1
Sourabh Sahu
Android Project Structure

Create an android project as mentioned in

Installation testing slides.
• Once created, the project
files contain various folders
and files about project
settings as well as your
Android Application
module.
• java/ : Source files for the module.
• manifests/ : Manifest files for the module
• res/ : Resource files for the module
Android manifest
• AndroidManifest.xml is one of the most important file in the Android
project structure.
• It contains information of the package, including components of the
application such as activities, services, broadcast receivers, content
providers etc.
It performs the following tasks:
• It is responsible to protect the application to access any protected parts by
providing the permissions
• It also declares the android api that the application is going to use
• It lists the instrumentation classes. The instrumentation classes provides
profiling and other informations. These information are removed just
before the application is published etc.
Android project architecture
java
• java
• The java folder contains the Java source code
files of the application organized into packages.
We can have more than one package in the
Android application. Its always a good practice to
break the source code of the application into
different packages based on its core functionality.
All the source files of the Activities, Services etc.
go into this folder.
Java classes
res
• res
• Res folder is where all the external resources for the
application such as images, layout XML files, strings,
animations, audio files etc. are stored.
• Sub folders:
• Drawable: This folder contains the bitmap file to be used
in the program. There are different folders to store
drawables. They are drawable-ldpi, drawable-mdpi,
drawable-hdpi,drawable-xdpi etc. The folders are to provide
alternative image resources to specific screen
configurations. Ldpi, mdpi & hdpi stands for low density,
medium density & high density screens respectively. The
resources for each screen resolutions are stored in
respective folders and the android system will choose it
according to the pixel density of the devicein this folder
Android project architecture
• Layout: It contains XML files that define
the User Interface of the application
• Menu: XML files that define menus for the
application goes into this folder
• Mipmap: The mipmap folders is used for
placing the app icons only. Any other
drawable assets should be placed in the
relevant drawable folders as before.
• Values : XML files that define simple
values such as strings, arrays, integers,
dimensions, colors, styles etc. are placed
• Gradle Scripts
• Gradle scripts are used to automate tasks.For the
most part, Android Studio performs application
builds in the background without any intervention
from the developer. This build process is handled
using the Gradle system, an automated build
toolkit designed to allow the ways in which
projects are built to be configured and managed
through a set of build configuration files.It uses a
language called groovy.
Gradle script
Android project architecture
.idea
Eclipse uses project.properties file for project specific metadata. Here in
Android Studio, this .idea does the same thing. This means the project
specific metadata is stored by Android Studio.
Project Module(app)
This is the actual project folder where the application code resides. The
application folder has following sub directories
build : This has all the complete output of the make process i.e.
classes.dex, compiled classes and resources, etc.In the Android Studio
GUI, only a few folders are shown. The important part is that the R.java
is found here under build/generated/source/r/…/R.java
libs : This is a commonly seen folder in eclipse and android studio,
which optionally can hold the libraries or .jar files
src : The src folder can have both application code and android unit
test script. You will find two folders named “androidTest” and “main”
correspond to src folder. The main folder contains two subfolders java
and res. The java folder contains all the java codes and res contains
drawables, layouts etc.
gradle
This is where the gradle build systems jar wrapper is found. This jar is
how Android Studio communicates with gradle installed in
Windows/MAC.
Android project architecture
• External Libraries
• This is not actually a folder but a place where
Referenced Libraries and information on targeted
platform SDK are shown.
• What is R.java?
• Android R.java is an auto-generated file
by aapt (Android Asset Packaging Tool) that
contains resource IDs for all the resources of res/
directory.
On creating any component in the
activity_main.xml file, id for the corresponding
component is automatically created in this file.
This id can be used in the activity source file to
perform any action on the component.
• Android Compilers
• The compilers converts compiled .class
files to executable .dex files in the Dalvik
format for further execution in the Android
environment. Following are the two
important tools used:
• DEX
• Dalvik Virtual Machine is an Android Virtual
Machine optimized for mobile devices. It
optimizes the virtual machine for memory,
battery life and performance. The Dex compiler
converts the class files into the .dex file that run
on the Dalvik Virtual Machine. The Multiple class
files are converted into one dex file. Following
flow depicts compiling and packaging process
• The javac tool compiles the java source
file into the class file.
• The dx tool takes all the class files of the
application and generates a single .dex
file. It is a platform-specific tool.
• The Android Assets Packaging Tool (aapt)
handles the packaging process.
The ProGuard tool shrinks, optimizes, and obfuscates the code by
removing unused code and renaming classes, fields, and
methods with semantically obscure names. The result is a
smaller sized .apk file that is more difficult to reverse engineer.
Android ProGuard
Thank You
20

More Related Content

PDF
Android Development
PDF
Android application development
DOC
.Net assembly
PDF
Android stepbystep
PPTX
Android System Architecture And  Pen-testing of Android applications
PPT
Talk on .NET assemblies
ODP
Android App Development - 01 Introduction
PPTX
Assemblies
Android Development
Android application development
.Net assembly
Android stepbystep
Android System Architecture And  Pen-testing of Android applications
Talk on .NET assemblies
Android App Development - 01 Introduction
Assemblies

What's hot (8)

PPTX
ESSIR LivingKnowledge DiversityEngine tutorial
PPT
UML Case Tools
PPT
Eclipse
PPTX
Scala and its Ecosystem
PDF
.NET Core, ASP.NET Core Course, Session 3
PPS
dot NET Framework
PPTX
Android Basic
PPTX
Android
ESSIR LivingKnowledge DiversityEngine tutorial
UML Case Tools
Eclipse
Scala and its Ecosystem
.NET Core, ASP.NET Core Course, Session 3
dot NET Framework
Android Basic
Android
Ad

Similar to Android project architecture (20)

PPTX
this is PPT for mobail application development
PPT
Unit 2 in environment science and technology
PPTX
Android app development lesson 1
PPTX
Anatomy of android aplication
PPTX
Anatomy Of An Adroid Application Lecture 3.pptx
PPTX
Android Studio development model and.pptx
PPTX
Session 2 beccse
PPTX
Android programming
PPTX
Lec-2-Mobile Application Development.pptx
PDF
Android app development by abhi android
PPTX
Android app development
PPT
Android Training Ahmedabad , Android Course Ahmedabad, Android architecture
PPTX
Introduction to Android Development Part 1
PDF
Android dev tips
PPTX
Presentation for Android OS
PPT
Android application structure
PPTX
2.Android Platform_Theory.pptx
PPTX
Android session-1-sajib
PPT
PPT Companion to Android
PPTX
Android Programming.pptx
this is PPT for mobail application development
Unit 2 in environment science and technology
Android app development lesson 1
Anatomy of android aplication
Anatomy Of An Adroid Application Lecture 3.pptx
Android Studio development model and.pptx
Session 2 beccse
Android programming
Lec-2-Mobile Application Development.pptx
Android app development by abhi android
Android app development
Android Training Ahmedabad , Android Course Ahmedabad, Android architecture
Introduction to Android Development Part 1
Android dev tips
Presentation for Android OS
Android application structure
2.Android Platform_Theory.pptx
Android session-1-sajib
PPT Companion to Android
Android Programming.pptx
Ad

More from Sourabh Sahu (20)

PPTX
Understanding GIT and Version Control
PPTX
Python Seaborn Data Visualization
PPTX
Mongo db Quick Guide
PPTX
Python Course
PPTX
Android styles and themes
PPT
SeekBar in Android
PPTX
Android layouts
PPT
Android ListView and Custom ListView
PPT
Activities
PPT
Shared preferences
PPT
Content Providers in Android
PPT
SQLITE Android
PPT
Calendar, Clocks, DatePicker and TimePicker
PPT
Progress Dialog, AlertDialog, CustomDialog
PPT
AutocompleteTextView And MultiAutoCompleteTextView
PPT
Web view
PPT
Parceable serializable
PPT
Android Architecture
PPT
Android Installation Testing
PPT
Android Installation
Understanding GIT and Version Control
Python Seaborn Data Visualization
Mongo db Quick Guide
Python Course
Android styles and themes
SeekBar in Android
Android layouts
Android ListView and Custom ListView
Activities
Shared preferences
Content Providers in Android
SQLITE Android
Calendar, Clocks, DatePicker and TimePicker
Progress Dialog, AlertDialog, CustomDialog
AutocompleteTextView And MultiAutoCompleteTextView
Web view
Parceable serializable
Android Architecture
Android Installation Testing
Android Installation

Recently uploaded (20)

PDF
Teacher's Day Quiz 2025
PDF
V02-Session-4-Leadership-Through-Assessment-MLB.pdf
PPTX
Environmental Sciences and Sustainability Chapter 2
PPTX
FILIPINO 8 Q2 WEEK 1(DAY 1).power point presentation
PDF
WHAT NURSES SAY_ COMMUNICATION BEHAVIORS ASSOCIATED WITH THE COMP.pdf
PPTX
macro complete discussion with given activities
DOCX
OA 7- Administrative Office Procedure and Management.docx
PDF
Jana-Ojana Finals 2025 - School Quiz by Pragya - UEMK Quiz Club
PDF
Financial Reporting and Analysis Using Financial Accounting Information by Ch...
PDF
HSE 2022-2023.pdf الصحه والسلامه هندسه نفط
PPTX
Unit1_Kumod_deeplearning.pptx DEEP LEARNING
PPTX
chapter-1-221011141445-58f8b864sdfghj.pptx
PDF
BA-1ST(Education)-Education and Society.pdf
PDF
HSE and their team are going through the hazards of the issues with learning ...
PDF
[Medicalstudyzone.com] 1. AIIMS NOV EMBER 2015 SOLVED PAPER.pdf
PDF
Global strategy and action plan on oral health 2023 - 2030.pdf
PPTX
UCSP Section A - Human Cultural Variations,Social Differences,social ChangeCo...
DOCX
HELMET DETECTION AND BIOMETRIC BASED VEHICLESECURITY USING MACHINE LEARNING.docx
PDF
NGÂN HÀNG CÂU HỎI TÁCH CHỌN LỌC THEO CHUYÊN ĐỀ TỪ ĐỀ THI THỬ TN THPT 2025 TIẾ...
Teacher's Day Quiz 2025
V02-Session-4-Leadership-Through-Assessment-MLB.pdf
Environmental Sciences and Sustainability Chapter 2
FILIPINO 8 Q2 WEEK 1(DAY 1).power point presentation
WHAT NURSES SAY_ COMMUNICATION BEHAVIORS ASSOCIATED WITH THE COMP.pdf
macro complete discussion with given activities
OA 7- Administrative Office Procedure and Management.docx
Jana-Ojana Finals 2025 - School Quiz by Pragya - UEMK Quiz Club
Financial Reporting and Analysis Using Financial Accounting Information by Ch...
HSE 2022-2023.pdf الصحه والسلامه هندسه نفط
Unit1_Kumod_deeplearning.pptx DEEP LEARNING
chapter-1-221011141445-58f8b864sdfghj.pptx
BA-1ST(Education)-Education and Society.pdf
HSE and their team are going through the hazards of the issues with learning ...
[Medicalstudyzone.com] 1. AIIMS NOV EMBER 2015 SOLVED PAPER.pdf
Global strategy and action plan on oral health 2023 - 2030.pdf
UCSP Section A - Human Cultural Variations,Social Differences,social ChangeCo...
HELMET DETECTION AND BIOMETRIC BASED VEHICLESECURITY USING MACHINE LEARNING.docx
NGÂN HÀNG CÂU HỎI TÁCH CHỌN LỌC THEO CHUYÊN ĐỀ TỪ ĐỀ THI THỬ TN THPT 2025 TIẾ...

Android project architecture

  • 2. Android Project Structure  Create an android project as mentioned in  Installation testing slides.
  • 3. • Once created, the project files contain various folders and files about project settings as well as your Android Application module.
  • 4. • java/ : Source files for the module. • manifests/ : Manifest files for the module • res/ : Resource files for the module
  • 5. Android manifest • AndroidManifest.xml is one of the most important file in the Android project structure. • It contains information of the package, including components of the application such as activities, services, broadcast receivers, content providers etc. It performs the following tasks: • It is responsible to protect the application to access any protected parts by providing the permissions • It also declares the android api that the application is going to use • It lists the instrumentation classes. The instrumentation classes provides profiling and other informations. These information are removed just before the application is published etc.
  • 7. java • java • The java folder contains the Java source code files of the application organized into packages. We can have more than one package in the Android application. Its always a good practice to break the source code of the application into different packages based on its core functionality. All the source files of the Activities, Services etc. go into this folder.
  • 9. res • res • Res folder is where all the external resources for the application such as images, layout XML files, strings, animations, audio files etc. are stored. • Sub folders: • Drawable: This folder contains the bitmap file to be used in the program. There are different folders to store drawables. They are drawable-ldpi, drawable-mdpi, drawable-hdpi,drawable-xdpi etc. The folders are to provide alternative image resources to specific screen configurations. Ldpi, mdpi & hdpi stands for low density, medium density & high density screens respectively. The resources for each screen resolutions are stored in respective folders and the android system will choose it according to the pixel density of the devicein this folder
  • 11. • Layout: It contains XML files that define the User Interface of the application • Menu: XML files that define menus for the application goes into this folder • Mipmap: The mipmap folders is used for placing the app icons only. Any other drawable assets should be placed in the relevant drawable folders as before. • Values : XML files that define simple values such as strings, arrays, integers, dimensions, colors, styles etc. are placed
  • 12. • Gradle Scripts • Gradle scripts are used to automate tasks.For the most part, Android Studio performs application builds in the background without any intervention from the developer. This build process is handled using the Gradle system, an automated build toolkit designed to allow the ways in which projects are built to be configured and managed through a set of build configuration files.It uses a language called groovy. Gradle script
  • 14. .idea Eclipse uses project.properties file for project specific metadata. Here in Android Studio, this .idea does the same thing. This means the project specific metadata is stored by Android Studio. Project Module(app) This is the actual project folder where the application code resides. The application folder has following sub directories build : This has all the complete output of the make process i.e. classes.dex, compiled classes and resources, etc.In the Android Studio GUI, only a few folders are shown. The important part is that the R.java is found here under build/generated/source/r/…/R.java libs : This is a commonly seen folder in eclipse and android studio, which optionally can hold the libraries or .jar files src : The src folder can have both application code and android unit test script. You will find two folders named “androidTest” and “main” correspond to src folder. The main folder contains two subfolders java and res. The java folder contains all the java codes and res contains drawables, layouts etc. gradle This is where the gradle build systems jar wrapper is found. This jar is how Android Studio communicates with gradle installed in Windows/MAC.
  • 16. • External Libraries • This is not actually a folder but a place where Referenced Libraries and information on targeted platform SDK are shown. • What is R.java? • Android R.java is an auto-generated file by aapt (Android Asset Packaging Tool) that contains resource IDs for all the resources of res/ directory. On creating any component in the activity_main.xml file, id for the corresponding component is automatically created in this file. This id can be used in the activity source file to perform any action on the component.
  • 17. • Android Compilers • The compilers converts compiled .class files to executable .dex files in the Dalvik format for further execution in the Android environment. Following are the two important tools used: • DEX • Dalvik Virtual Machine is an Android Virtual Machine optimized for mobile devices. It optimizes the virtual machine for memory, battery life and performance. The Dex compiler converts the class files into the .dex file that run on the Dalvik Virtual Machine. The Multiple class files are converted into one dex file. Following flow depicts compiling and packaging process
  • 18. • The javac tool compiles the java source file into the class file. • The dx tool takes all the class files of the application and generates a single .dex file. It is a platform-specific tool. • The Android Assets Packaging Tool (aapt) handles the packaging process.
  • 19. The ProGuard tool shrinks, optimizes, and obfuscates the code by removing unused code and renaming classes, fields, and methods with semantically obscure names. The result is a smaller sized .apk file that is more difficult to reverse engineer. Android ProGuard