SlideShare a Scribd company logo
1 of 20
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.
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
• 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
.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.
• 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

What's hot

ESSIR LivingKnowledge DiversityEngine tutorial
ESSIR LivingKnowledge DiversityEngine tutorialESSIR LivingKnowledge DiversityEngine tutorial
ESSIR LivingKnowledge DiversityEngine tutorialJonathon Hare
 
UML Case Tools
UML Case ToolsUML Case Tools
UML Case ToolsAshesh R
 
Scala and its Ecosystem
Scala and its EcosystemScala and its Ecosystem
Scala and its EcosystemPetr Hošek
 
.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3aminmesbahi
 

What's hot (8)

ESSIR LivingKnowledge DiversityEngine tutorial
ESSIR LivingKnowledge DiversityEngine tutorialESSIR LivingKnowledge DiversityEngine tutorial
ESSIR LivingKnowledge DiversityEngine tutorial
 
UML Case Tools
UML Case ToolsUML Case Tools
UML Case Tools
 
Eclipse
EclipseEclipse
Eclipse
 
Scala and its Ecosystem
Scala and its EcosystemScala and its Ecosystem
Scala and its Ecosystem
 
.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3
 
dot NET Framework
dot NET Frameworkdot NET Framework
dot NET Framework
 
Android Basic
Android BasicAndroid Basic
Android Basic
 
Android
Android Android
Android
 

Similar to Android project architecture

Android app development lesson 1
Android app development lesson 1Android app development lesson 1
Android app development lesson 1Kalluri Vinay Reddy
 
Anatomy of android aplication
Anatomy of android aplicationAnatomy of android aplication
Anatomy of android aplicationpoojapainter
 
Anatomy Of An Adroid Application Lecture 3.pptx
Anatomy Of An Adroid Application Lecture 3.pptxAnatomy Of An Adroid Application Lecture 3.pptx
Anatomy Of An Adroid Application Lecture 3.pptxMuzamil Yousaf
 
Android Studio development model and.pptx
Android Studio development model and.pptxAndroid Studio development model and.pptx
Android Studio development model and.pptxVaibhavKhunger2
 
Android app development by abhi android
Android app development by abhi androidAndroid app development by abhi android
Android app development by abhi androidsusijanny
 
Android app development
Android app developmentAndroid app development
Android app developmentAbhishek Saini
 
Android Training Ahmedabad , Android Course Ahmedabad, Android architecture
Android Training Ahmedabad , Android Course Ahmedabad, Android architectureAndroid Training Ahmedabad , Android Course Ahmedabad, Android architecture
Android Training Ahmedabad , Android Course Ahmedabad, Android architectureNicheTech Com. Solutions Pvt. Ltd.
 
Introduction to Android Development Part 1
Introduction to Android Development Part 1Introduction to Android Development Part 1
Introduction to Android Development Part 1Kainda Kiniel Daka
 
Presentation for Android OS
Presentation for Android OSPresentation for Android OS
Presentation for Android OSMukul Cool
 
Android application structure
Android application structureAndroid application structure
Android application structureAlexey Ustenko
 
2.Android Platform_Theory.pptx
2.Android Platform_Theory.pptx2.Android Platform_Theory.pptx
2.Android Platform_Theory.pptxNizarnizarsurche
 
Android Application Fundamentals
Android Application FundamentalsAndroid Application Fundamentals
Android Application FundamentalsVikalp Jain
 
How to create android applications
How to create android applicationsHow to create android applications
How to create android applicationsTOPS Technologies
 
Android Penetration Testing - Day 1
Android Penetration Testing - Day 1Android Penetration Testing - Day 1
Android Penetration Testing - Day 1Mohammed Adam
 

Similar to Android project architecture (20)

Android app development lesson 1
Android app development lesson 1Android app development lesson 1
Android app development lesson 1
 
Anatomy of android aplication
Anatomy of android aplicationAnatomy of android aplication
Anatomy of android aplication
 
Anatomy Of An Adroid Application Lecture 3.pptx
Anatomy Of An Adroid Application Lecture 3.pptxAnatomy Of An Adroid Application Lecture 3.pptx
Anatomy Of An Adroid Application Lecture 3.pptx
 
Android Studio development model and.pptx
Android Studio development model and.pptxAndroid Studio development model and.pptx
Android Studio development model and.pptx
 
Session 2 beccse
Session 2 beccseSession 2 beccse
Session 2 beccse
 
Android programming
Android programmingAndroid programming
Android programming
 
Android app development by abhi android
Android app development by abhi androidAndroid app development by abhi android
Android app development by abhi android
 
Android app development
Android app developmentAndroid app development
Android app development
 
Android Training Ahmedabad , Android Course Ahmedabad, Android architecture
Android Training Ahmedabad , Android Course Ahmedabad, Android architectureAndroid Training Ahmedabad , Android Course Ahmedabad, Android architecture
Android Training Ahmedabad , Android Course Ahmedabad, Android architecture
 
Introduction to Android Development Part 1
Introduction to Android Development Part 1Introduction to Android Development Part 1
Introduction to Android Development Part 1
 
Android dev tips
Android dev tipsAndroid dev tips
Android dev tips
 
Presentation for Android OS
Presentation for Android OSPresentation for Android OS
Presentation for Android OS
 
Android application structure
Android application structureAndroid application structure
Android application structure
 
2.Android Platform_Theory.pptx
2.Android Platform_Theory.pptx2.Android Platform_Theory.pptx
2.Android Platform_Theory.pptx
 
Android session-1-sajib
Android session-1-sajibAndroid session-1-sajib
Android session-1-sajib
 
PPT Companion to Android
PPT Companion to AndroidPPT Companion to Android
PPT Companion to Android
 
Android Programming.pptx
Android Programming.pptxAndroid Programming.pptx
Android Programming.pptx
 
Android Application Fundamentals
Android Application FundamentalsAndroid Application Fundamentals
Android Application Fundamentals
 
How to create android applications
How to create android applicationsHow to create android applications
How to create android applications
 
Android Penetration Testing - Day 1
Android Penetration Testing - Day 1Android Penetration Testing - Day 1
Android Penetration Testing - Day 1
 

More from Sourabh Sahu

Understanding GIT and Version Control
Understanding GIT and Version ControlUnderstanding GIT and Version Control
Understanding GIT and Version ControlSourabh Sahu
 
Python Seaborn Data Visualization
Python Seaborn Data Visualization Python Seaborn Data Visualization
Python Seaborn Data Visualization Sourabh Sahu
 
Mongo db Quick Guide
Mongo db Quick GuideMongo db Quick Guide
Mongo db Quick GuideSourabh Sahu
 
Android styles and themes
Android styles and themesAndroid styles and themes
Android styles and themesSourabh Sahu
 
SeekBar in Android
SeekBar in AndroidSeekBar in Android
SeekBar in AndroidSourabh Sahu
 
Android ListView and Custom ListView
Android ListView and Custom ListView Android ListView and Custom ListView
Android ListView and Custom ListView Sourabh Sahu
 
Shared preferences
Shared preferencesShared preferences
Shared preferencesSourabh Sahu
 
Content Providers in Android
Content Providers in AndroidContent Providers in Android
Content Providers in AndroidSourabh Sahu
 
Calendar, Clocks, DatePicker and TimePicker
Calendar, Clocks, DatePicker and TimePickerCalendar, Clocks, DatePicker and TimePicker
Calendar, Clocks, DatePicker and TimePickerSourabh Sahu
 
Progress Dialog, AlertDialog, CustomDialog
Progress Dialog, AlertDialog, CustomDialogProgress Dialog, AlertDialog, CustomDialog
Progress Dialog, AlertDialog, CustomDialogSourabh Sahu
 
AutocompleteTextView And MultiAutoCompleteTextView
AutocompleteTextView And MultiAutoCompleteTextViewAutocompleteTextView And MultiAutoCompleteTextView
AutocompleteTextView And MultiAutoCompleteTextViewSourabh Sahu
 
Parceable serializable
Parceable serializableParceable serializable
Parceable serializableSourabh Sahu
 
Android Architecture
Android ArchitectureAndroid Architecture
Android ArchitectureSourabh Sahu
 
Android Installation Testing
Android Installation TestingAndroid Installation Testing
Android Installation TestingSourabh Sahu
 
Android Installation
Android Installation Android Installation
Android Installation Sourabh Sahu
 

More from Sourabh Sahu (20)

Understanding GIT and Version Control
Understanding GIT and Version ControlUnderstanding GIT and Version Control
Understanding GIT and Version Control
 
Python Seaborn Data Visualization
Python Seaborn Data Visualization Python Seaborn Data Visualization
Python Seaborn Data Visualization
 
Mongo db Quick Guide
Mongo db Quick GuideMongo db Quick Guide
Mongo db Quick Guide
 
Python Course
Python CoursePython Course
Python Course
 
Android styles and themes
Android styles and themesAndroid styles and themes
Android styles and themes
 
SeekBar in Android
SeekBar in AndroidSeekBar in Android
SeekBar in Android
 
Android layouts
Android layoutsAndroid layouts
Android layouts
 
Android ListView and Custom ListView
Android ListView and Custom ListView Android ListView and Custom ListView
Android ListView and Custom ListView
 
Activities
ActivitiesActivities
Activities
 
Shared preferences
Shared preferencesShared preferences
Shared preferences
 
Content Providers in Android
Content Providers in AndroidContent Providers in Android
Content Providers in Android
 
SQLITE Android
SQLITE AndroidSQLITE Android
SQLITE Android
 
Calendar, Clocks, DatePicker and TimePicker
Calendar, Clocks, DatePicker and TimePickerCalendar, Clocks, DatePicker and TimePicker
Calendar, Clocks, DatePicker and TimePicker
 
Progress Dialog, AlertDialog, CustomDialog
Progress Dialog, AlertDialog, CustomDialogProgress Dialog, AlertDialog, CustomDialog
Progress Dialog, AlertDialog, CustomDialog
 
AutocompleteTextView And MultiAutoCompleteTextView
AutocompleteTextView And MultiAutoCompleteTextViewAutocompleteTextView And MultiAutoCompleteTextView
AutocompleteTextView And MultiAutoCompleteTextView
 
Web view
Web viewWeb view
Web view
 
Parceable serializable
Parceable serializableParceable serializable
Parceable serializable
 
Android Architecture
Android ArchitectureAndroid Architecture
Android Architecture
 
Android Installation Testing
Android Installation TestingAndroid Installation Testing
Android Installation Testing
 
Android Installation
Android Installation Android Installation
Android Installation
 

Recently uploaded

Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 

Recently uploaded (20)

Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 

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.
  • 6.
  • 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
  • 10.
  • 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
  • 13.
  • 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.
  • 15.
  • 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