SlideShare ist ein Scribd-Unternehmen logo
1 von 73
Downloaden Sie, um offline zu lesen
Software Engineering Large Practical

  Debugging Android Applications,
working with Android Virtual Devices,
           and Manifests

                   Stephen Gilmore

      School of Informatics, University of Edinburgh


                October 10th, 2012




              Stephen Gilmore   Software Engineering Large Practical
Eclipse DDMS perspective
The Dalvik Debug Monitor Server (DDMS) is a debugging tool for
Android. It provides port-forwarding services and screen capture on
the device. It provides information about process, threads and
heap usage. It contains the logcat console which allows us to see
diagnostic error messages. It allows the developer to simulate the
effect of an incoming call or SMS, or to simulate setting the
phone’s location.




                      Stephen Gilmore   Software Engineering Large Practical
DDMS perspective in Eclipse




.05.14.png




                      Stephen Gilmore   Software Engineering Large Practical
Set your location




                    Stephen Gilmore   Software Engineering Large Practical
LogCat — a log of events on the phone




                   Stephen Gilmore   Software Engineering Large Practical
File Explorer — see files on the phone




.07.32.png




                      Stephen Gilmore   Software Engineering Large Practical
Devices — see processes in the emulator




.10.14.png




                      Stephen Gilmore   Software Engineering Large Practical
Allocation tracker




.10.28.png




                        Stephen Gilmore   Software Engineering Large Practical
Creating an Android Virtual Device
An Android Virtual Device (AVD) is an emulator configuration
which allows the developer to replicate the effect of having an
actual Android device such as a phone or a tablet. The AVD allows
you to specify hardware and software settings which will be
emulated by the Android Emulator. When creating a new AVD you
specify the target API (i.e. a particular version of Android).




                     Stephen Gilmore   Software Engineering Large Practical
Creating an emulator




                   Stephen Gilmore   Software Engineering Large Practical
Android Virtual Device (AVD) manager




                  Stephen Gilmore   Software Engineering Large Practical
Create a new AVD (Click New...)




                   Stephen Gilmore   Software Engineering Large Practical
Create new Android Virtual Device




.21.54.png

                      Stephen Gilmore   Software Engineering Large Practical
Starting the emulator
Having defined the type of AVD that we are interested in, we can
start one running and investigate the functions of our virtual
device.




                     Stephen Gilmore   Software Engineering Large Practical
Start the new AVD




.22.07.png




                       Stephen Gilmore   Software Engineering Large Practical
Launch Options




.22.18.png




                    Stephen Gilmore   Software Engineering Large Practical
Emulator launches ...




.23.31.png



                       Stephen Gilmore   Software Engineering Large Practical
Emulator home page is displayed




.03.13.png



                      Stephen Gilmore   Software Engineering Large Practical
Click to display options




.03.14.png



                        Stephen Gilmore   Software Engineering Large Practical
Functions of the phone




.03.57.png



                      Stephen Gilmore   Software Engineering Large Practical
Developer tools
There are some tools on the device which are specifically there to
help developers (API Demos and Dev Tools). The developer tools
allow us to see (for example) processes which are running on the
phone.




                     Stephen Gilmore   Software Engineering Large Practical
Useful functions




.11.56.png



                      Stephen Gilmore   Software Engineering Large Practical
Developer Tools




.04.23.png



                     Stephen Gilmore   Software Engineering Large Practical
Running processes




.05.16.png



                       Stephen Gilmore   Software Engineering Large Practical
API demos
There are some tools on the device which are specifically there to
help developers (API Demos and Dev Tools). Using these we can
learn about the Android API features such as auto-completion.




                     Stephen Gilmore   Software Engineering Large Practical
Useful functions




.11.56.png



                      Stephen Gilmore   Software Engineering Large Practical
API demos




.05.43.png



               Stephen Gilmore   Software Engineering Large Practical
API demos




.06.09.png



               Stephen Gilmore   Software Engineering Large Practical
API demos




.06.17.png



               Stephen Gilmore   Software Engineering Large Practical
Auto-complete contacts




.09.29.png



                      Stephen Gilmore   Software Engineering Large Practical
Manifest files
Every Android application must have an AndroidManifest.xml
file (with precisely that name) in its root directory. The manifest
presents essential information about the application to the Android
system, including information about intents which are messages
sent to activities, services and broadcast receivers. The manifest
also specifies permissions which the application requests (such as
the permission to connect to paired Bluetooth devices) and
libraries that it needs.




                      Stephen Gilmore   Software Engineering Large Practical
Manifest files




                Stephen Gilmore   Software Engineering Large Practical
The manifest editor




                      Stephen Gilmore   Software Engineering Large Practical
Adding extras




.50.09.png


                   Stephen Gilmore   Software Engineering Large Practical
Labels and icons




                   Stephen Gilmore   Software Engineering Large Practical
Application nodes and intents




.50.50.png


                       Stephen Gilmore   Software Engineering Large Practical
Attributes for an action




                     Stephen Gilmore   Software Engineering Large Practical
Add permissions




                  Stephen Gilmore   Software Engineering Large Practical
Add instrumentation




                      Stephen Gilmore   Software Engineering Large Practical
Source code view




                   Stephen Gilmore   Software Engineering Large Practical
Source code tab




.51.48.2.png


                     Stephen Gilmore   Software Engineering Large Practical
Resources and strings
An Android application may need resources such as image files and
strings. A string resource provides text strings for the application
with optional text styling and formatting.




                      Stephen Gilmore   Software Engineering Large Practical
Resources and strings




                    Stephen Gilmore   Software Engineering Large Practical
A String resource, app name




                   Stephen Gilmore   Software Engineering Large Practical
Managing string resources




                   Stephen Gilmore   Software Engineering Large Practical
Drawable resources




                     Stephen Gilmore   Software Engineering Large Practical
Managing drawable resources




                   Stephen Gilmore   Software Engineering Large Practical
Contents of app notes.png




                 Stephen Gilmore   Software Engineering Large Practical
The icon in the launcher view




                    Stephen Gilmore   Software Engineering Large Practical
Editing string resources
String resources can be edited using the Android Resources editor.




                     Stephen Gilmore   Software Engineering Large Practical
Application nodes




                    Stephen Gilmore   Software Engineering Large Practical
Browsing




           Stephen Gilmore   Software Engineering Large Practical
Editing strings




                  Stephen Gilmore   Software Engineering Large Practical
Updating a string




                    Stephen Gilmore   Software Engineering Large Practical
Text in the XML view




                  Stephen Gilmore   Software Engineering Large Practical
Updating a string in the Resources view




                    Stephen Gilmore   Software Engineering Large Practical
The XML text is updated automatically




                   Stephen Gilmore   Software Engineering Large Practical
Getting it wrong: editing the XML




                   Stephen Gilmore   Software Engineering Large Practical
The bug shows up in the resources view




                   Stephen Gilmore   Software Engineering Large Practical
Oh dear




          Stephen Gilmore   Software Engineering Large Practical
Android Eclipse issues
Working with hand-crafted and automatically-generated Java files
can be confusing. In particular we focus on errors involving the
automatically-generated R.java file.




                     Stephen Gilmore   Software Engineering Large Practical
Oh no, Java problems . . .




                     Stephen Gilmore   Software Engineering Large Practical
“Layout cannot be resolved . . . ”




                     Stephen Gilmore   Software Engineering Large Practical
R.java is generated so clean the project?




                    Stephen Gilmore   Software Engineering Large Practical
No good. Delete R.java and try again?




                   Stephen Gilmore   Software Engineering Large Practical
R.java is regenerated but errors remain




                    Stephen Gilmore   Software Engineering Large Practical
Refresh the view?




                    Stephen Gilmore   Software Engineering Large Practical
No good. What now?




                 Stephen Gilmore   Software Engineering Large Practical
Close the project and reopen it?




                    Stephen Gilmore   Software Engineering Large Practical
Reopening the project. Praying . . .




                     Stephen Gilmore   Software Engineering Large Practical
Didn’t work :-( but look at this . . .




                      Stephen Gilmore   Software Engineering Large Practical
Moving the folder fixes the problem :-)




                    Stephen Gilmore   Software Engineering Large Practical
Moving the folder fixes the problem :-)




                    Stephen Gilmore   Software Engineering Large Practical

Weitere ähnliche Inhalte

Andere mochten auch

Working with databases in Android
Working with databases in AndroidWorking with databases in Android
Working with databases in AndroidStephen Gilmore
 
Hacker Halted 2014 - Reverse Engineering the Android OS
Hacker Halted 2014 - Reverse Engineering the Android OSHacker Halted 2014 - Reverse Engineering the Android OS
Hacker Halted 2014 - Reverse Engineering the Android OSEC-Council
 
My Final year project on Android app development
My Final year project on Android app developmentMy Final year project on Android app development
My Final year project on Android app developmentrahulkumargiri
 
Steelcon 2015 Reverse-Engineering Obfuscated Android Applications
Steelcon 2015 Reverse-Engineering Obfuscated Android ApplicationsSteelcon 2015 Reverse-Engineering Obfuscated Android Applications
Steelcon 2015 Reverse-Engineering Obfuscated Android ApplicationsTom Keetch
 
Toll app - Android project
Toll app - Android projectToll app - Android project
Toll app - Android projectArun prasath
 
UseCase is a DIALOG---NOT a PROCESS
UseCase is a DIALOG---NOT a PROCESSUseCase is a DIALOG---NOT a PROCESS
UseCase is a DIALOG---NOT a PROCESSPutcha Narasimham
 
Activity diagram railway reservation system
Activity diagram railway reservation systemActivity diagram railway reservation system
Activity diagram railway reservation systemmuthumeenakshim
 
Payroll and attendance system
Payroll and attendance system Payroll and attendance system
Payroll and attendance system Moses Nkrumah
 
Usecase diagram railway reservation system
Usecase diagram railway reservation systemUsecase diagram railway reservation system
Usecase diagram railway reservation systemmuthumeenakshim
 
Android seminar-presentation
Android seminar-presentationAndroid seminar-presentation
Android seminar-presentationconnectshilpa
 
Software Engineering ppt
Software Engineering pptSoftware Engineering ppt
Software Engineering pptshruths2890
 

Andere mochten auch (14)

Working with databases in Android
Working with databases in AndroidWorking with databases in Android
Working with databases in Android
 
Arrays in Objective-C
Arrays in Objective-CArrays in Objective-C
Arrays in Objective-C
 
Android overview
Android overviewAndroid overview
Android overview
 
Hacker Halted 2014 - Reverse Engineering the Android OS
Hacker Halted 2014 - Reverse Engineering the Android OSHacker Halted 2014 - Reverse Engineering the Android OS
Hacker Halted 2014 - Reverse Engineering the Android OS
 
My Final year project on Android app development
My Final year project on Android app developmentMy Final year project on Android app development
My Final year project on Android app development
 
Steelcon 2015 Reverse-Engineering Obfuscated Android Applications
Steelcon 2015 Reverse-Engineering Obfuscated Android ApplicationsSteelcon 2015 Reverse-Engineering Obfuscated Android Applications
Steelcon 2015 Reverse-Engineering Obfuscated Android Applications
 
Toll app - Android project
Toll app - Android projectToll app - Android project
Toll app - Android project
 
UseCase is a DIALOG---NOT a PROCESS
UseCase is a DIALOG---NOT a PROCESSUseCase is a DIALOG---NOT a PROCESS
UseCase is a DIALOG---NOT a PROCESS
 
Activity diagram railway reservation system
Activity diagram railway reservation systemActivity diagram railway reservation system
Activity diagram railway reservation system
 
Payroll and attendance system
Payroll and attendance system Payroll and attendance system
Payroll and attendance system
 
Usecase diagram railway reservation system
Usecase diagram railway reservation systemUsecase diagram railway reservation system
Usecase diagram railway reservation system
 
Ziilion E245 final presentation
Ziilion E245 final presentationZiilion E245 final presentation
Ziilion E245 final presentation
 
Android seminar-presentation
Android seminar-presentationAndroid seminar-presentation
Android seminar-presentation
 
Software Engineering ppt
Software Engineering pptSoftware Engineering ppt
Software Engineering ppt
 

Ähnlich wie Debugging Android Apps & Manifests in Eclipse

Beginning Android Development
Beginning Android DevelopmentBeginning Android Development
Beginning Android DevelopmentStephen Gilmore
 
Feedback on Part 1 of the Software Engineering Large Practical
Feedback on Part 1 of the Software Engineering Large PracticalFeedback on Part 1 of the Software Engineering Large Practical
Feedback on Part 1 of the Software Engineering Large PracticalStephen Gilmore
 
Common Java problems when developing with Android
Common Java problems when developing with AndroidCommon Java problems when developing with Android
Common Java problems when developing with AndroidStephen Gilmore
 
Testing Android apps with Robotium
Testing Android apps with RobotiumTesting Android apps with Robotium
Testing Android apps with RobotiumStephen Gilmore
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-AutomationMindfire Solutions
 
Android presentation
Android presentationAndroid presentation
Android presentationImam Raza
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easyLars Vogel
 
Introduction to Android- A session by Sagar Das
Introduction to Android-  A session by Sagar DasIntroduction to Android-  A session by Sagar Das
Introduction to Android- A session by Sagar Dasdscfetju
 
Learning android with AOSP
Learning android with AOSPLearning android with AOSP
Learning android with AOSPJorge Barroso
 
MobSecCon 2015 - Dynamic Analysis of Android Apps
MobSecCon 2015 - Dynamic Analysis of Android AppsMobSecCon 2015 - Dynamic Analysis of Android Apps
MobSecCon 2015 - Dynamic Analysis of Android AppsRon Munitz
 
Creating the first app with android studio
Creating the first app with android studioCreating the first app with android studio
Creating the first app with android studioParinita03
 
Outsmarting smartphones
Outsmarting smartphonesOutsmarting smartphones
Outsmarting smartphonesSensePost
 
Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Lars Vogel
 
JavaOne 2009 BOF-5189 Griffon In Depth
JavaOne 2009 BOF-5189 Griffon In DepthJavaOne 2009 BOF-5189 Griffon In Depth
JavaOne 2009 BOF-5189 Griffon In DepthDanno Ferrin
 
Android app development ppt
Android app development pptAndroid app development ppt
Android app development pptsaitej15
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21dxsaki
 

Ähnlich wie Debugging Android Apps & Manifests in Eclipse (20)

Beginning Android Development
Beginning Android DevelopmentBeginning Android Development
Beginning Android Development
 
Feedback on Part 1 of the Software Engineering Large Practical
Feedback on Part 1 of the Software Engineering Large PracticalFeedback on Part 1 of the Software Engineering Large Practical
Feedback on Part 1 of the Software Engineering Large Practical
 
Common Java problems when developing with Android
Common Java problems when developing with AndroidCommon Java problems when developing with Android
Common Java problems when developing with Android
 
Testing Android apps with Robotium
Testing Android apps with RobotiumTesting Android apps with Robotium
Testing Android apps with Robotium
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-Automation
 
Android presentation
Android presentationAndroid presentation
Android presentation
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easy
 
Introduction to Android- A session by Sagar Das
Introduction to Android-  A session by Sagar DasIntroduction to Android-  A session by Sagar Das
Introduction to Android- A session by Sagar Das
 
Android ppt
Android pptAndroid ppt
Android ppt
 
JyothishNewResume5exp
JyothishNewResume5expJyothishNewResume5exp
JyothishNewResume5exp
 
Learning android with AOSP
Learning android with AOSPLearning android with AOSP
Learning android with AOSP
 
MobSecCon 2015 - Dynamic Analysis of Android Apps
MobSecCon 2015 - Dynamic Analysis of Android AppsMobSecCon 2015 - Dynamic Analysis of Android Apps
MobSecCon 2015 - Dynamic Analysis of Android Apps
 
Creating the first app with android studio
Creating the first app with android studioCreating the first app with android studio
Creating the first app with android studio
 
Outsmarting smartphones
Outsmarting smartphonesOutsmarting smartphones
Outsmarting smartphones
 
Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11
 
JavaOne 2009 BOF-5189 Griffon In Depth
JavaOne 2009 BOF-5189 Griffon In DepthJavaOne 2009 BOF-5189 Griffon In Depth
JavaOne 2009 BOF-5189 Griffon In Depth
 
Android app development ppt
Android app development pptAndroid app development ppt
Android app development ppt
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21
 
Supratik_CV_Photo
Supratik_CV_PhotoSupratik_CV_Photo
Supratik_CV_Photo
 

Mehr von Stephen Gilmore

Feedback on Part 1 of the CSLP
Feedback on Part 1 of the CSLPFeedback on Part 1 of the CSLP
Feedback on Part 1 of the CSLPStephen Gilmore
 
More Stochastic Simulation Examples
More Stochastic Simulation ExamplesMore Stochastic Simulation Examples
More Stochastic Simulation ExamplesStephen Gilmore
 
Quick quiz on Objective-C
Quick quiz on Objective-CQuick quiz on Objective-C
Quick quiz on Objective-CStephen Gilmore
 
Getting started with Xcode
Getting started with XcodeGetting started with Xcode
Getting started with XcodeStephen Gilmore
 
Crash Course in Objective-C
Crash Course in Objective-CCrash Course in Objective-C
Crash Course in Objective-CStephen Gilmore
 
The Stochastic Simulation Algorithm
The Stochastic Simulation AlgorithmThe Stochastic Simulation Algorithm
The Stochastic Simulation AlgorithmStephen Gilmore
 
Computer Science Large Practical coursework
Computer Science Large Practical courseworkComputer Science Large Practical coursework
Computer Science Large Practical courseworkStephen Gilmore
 
Software Engineering Large Practical coursework
Software Engineering Large Practical courseworkSoftware Engineering Large Practical coursework
Software Engineering Large Practical courseworkStephen Gilmore
 
Introduction to the CSLP and the SELP
Introduction to the CSLP and the SELPIntroduction to the CSLP and the SELP
Introduction to the CSLP and the SELPStephen Gilmore
 
Fixing errors in Android Java applications
Fixing errors in Android Java applicationsFixing errors in Android Java applications
Fixing errors in Android Java applicationsStephen Gilmore
 
Feedback on Part 1 of the Individual Practical
Feedback on Part 1 of the Individual PracticalFeedback on Part 1 of the Individual Practical
Feedback on Part 1 of the Individual PracticalStephen Gilmore
 
Creating and working with databases in Android
Creating and working with databases in AndroidCreating and working with databases in Android
Creating and working with databases in AndroidStephen Gilmore
 
Continuing Android development
Continuing Android developmentContinuing Android development
Continuing Android developmentStephen Gilmore
 
Project management for the individual practical
Project management for the individual practicalProject management for the individual practical
Project management for the individual practicalStephen Gilmore
 
Beginning Android development
Beginning Android developmentBeginning Android development
Beginning Android developmentStephen Gilmore
 
CS/SE Individual practical - DDMS and AVD
CS/SE Individual practical - DDMS and AVDCS/SE Individual practical - DDMS and AVD
CS/SE Individual practical - DDMS and AVDStephen Gilmore
 

Mehr von Stephen Gilmore (16)

Feedback on Part 1 of the CSLP
Feedback on Part 1 of the CSLPFeedback on Part 1 of the CSLP
Feedback on Part 1 of the CSLP
 
More Stochastic Simulation Examples
More Stochastic Simulation ExamplesMore Stochastic Simulation Examples
More Stochastic Simulation Examples
 
Quick quiz on Objective-C
Quick quiz on Objective-CQuick quiz on Objective-C
Quick quiz on Objective-C
 
Getting started with Xcode
Getting started with XcodeGetting started with Xcode
Getting started with Xcode
 
Crash Course in Objective-C
Crash Course in Objective-CCrash Course in Objective-C
Crash Course in Objective-C
 
The Stochastic Simulation Algorithm
The Stochastic Simulation AlgorithmThe Stochastic Simulation Algorithm
The Stochastic Simulation Algorithm
 
Computer Science Large Practical coursework
Computer Science Large Practical courseworkComputer Science Large Practical coursework
Computer Science Large Practical coursework
 
Software Engineering Large Practical coursework
Software Engineering Large Practical courseworkSoftware Engineering Large Practical coursework
Software Engineering Large Practical coursework
 
Introduction to the CSLP and the SELP
Introduction to the CSLP and the SELPIntroduction to the CSLP and the SELP
Introduction to the CSLP and the SELP
 
Fixing errors in Android Java applications
Fixing errors in Android Java applicationsFixing errors in Android Java applications
Fixing errors in Android Java applications
 
Feedback on Part 1 of the Individual Practical
Feedback on Part 1 of the Individual PracticalFeedback on Part 1 of the Individual Practical
Feedback on Part 1 of the Individual Practical
 
Creating and working with databases in Android
Creating and working with databases in AndroidCreating and working with databases in Android
Creating and working with databases in Android
 
Continuing Android development
Continuing Android developmentContinuing Android development
Continuing Android development
 
Project management for the individual practical
Project management for the individual practicalProject management for the individual practical
Project management for the individual practical
 
Beginning Android development
Beginning Android developmentBeginning Android development
Beginning Android development
 
CS/SE Individual practical - DDMS and AVD
CS/SE Individual practical - DDMS and AVDCS/SE Individual practical - DDMS and AVD
CS/SE Individual practical - DDMS and AVD
 

Kürzlich hochgeladen

4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvRicaMaeCastro1
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleCeline George
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsPooky Knightsmith
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 

Kürzlich hochgeladen (20)

INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP Module
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young minds
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 

Debugging Android Apps & Manifests in Eclipse

  • 1. Software Engineering Large Practical Debugging Android Applications, working with Android Virtual Devices, and Manifests Stephen Gilmore School of Informatics, University of Edinburgh October 10th, 2012 Stephen Gilmore Software Engineering Large Practical
  • 2. Eclipse DDMS perspective The Dalvik Debug Monitor Server (DDMS) is a debugging tool for Android. It provides port-forwarding services and screen capture on the device. It provides information about process, threads and heap usage. It contains the logcat console which allows us to see diagnostic error messages. It allows the developer to simulate the effect of an incoming call or SMS, or to simulate setting the phone’s location. Stephen Gilmore Software Engineering Large Practical
  • 3. DDMS perspective in Eclipse .05.14.png Stephen Gilmore Software Engineering Large Practical
  • 4. Set your location Stephen Gilmore Software Engineering Large Practical
  • 5. LogCat — a log of events on the phone Stephen Gilmore Software Engineering Large Practical
  • 6. File Explorer — see files on the phone .07.32.png Stephen Gilmore Software Engineering Large Practical
  • 7. Devices — see processes in the emulator .10.14.png Stephen Gilmore Software Engineering Large Practical
  • 8. Allocation tracker .10.28.png Stephen Gilmore Software Engineering Large Practical
  • 9. Creating an Android Virtual Device An Android Virtual Device (AVD) is an emulator configuration which allows the developer to replicate the effect of having an actual Android device such as a phone or a tablet. The AVD allows you to specify hardware and software settings which will be emulated by the Android Emulator. When creating a new AVD you specify the target API (i.e. a particular version of Android). Stephen Gilmore Software Engineering Large Practical
  • 10. Creating an emulator Stephen Gilmore Software Engineering Large Practical
  • 11. Android Virtual Device (AVD) manager Stephen Gilmore Software Engineering Large Practical
  • 12. Create a new AVD (Click New...) Stephen Gilmore Software Engineering Large Practical
  • 13. Create new Android Virtual Device .21.54.png Stephen Gilmore Software Engineering Large Practical
  • 14. Starting the emulator Having defined the type of AVD that we are interested in, we can start one running and investigate the functions of our virtual device. Stephen Gilmore Software Engineering Large Practical
  • 15. Start the new AVD .22.07.png Stephen Gilmore Software Engineering Large Practical
  • 16. Launch Options .22.18.png Stephen Gilmore Software Engineering Large Practical
  • 17. Emulator launches ... .23.31.png Stephen Gilmore Software Engineering Large Practical
  • 18. Emulator home page is displayed .03.13.png Stephen Gilmore Software Engineering Large Practical
  • 19. Click to display options .03.14.png Stephen Gilmore Software Engineering Large Practical
  • 20. Functions of the phone .03.57.png Stephen Gilmore Software Engineering Large Practical
  • 21. Developer tools There are some tools on the device which are specifically there to help developers (API Demos and Dev Tools). The developer tools allow us to see (for example) processes which are running on the phone. Stephen Gilmore Software Engineering Large Practical
  • 22. Useful functions .11.56.png Stephen Gilmore Software Engineering Large Practical
  • 23. Developer Tools .04.23.png Stephen Gilmore Software Engineering Large Practical
  • 24. Running processes .05.16.png Stephen Gilmore Software Engineering Large Practical
  • 25. API demos There are some tools on the device which are specifically there to help developers (API Demos and Dev Tools). Using these we can learn about the Android API features such as auto-completion. Stephen Gilmore Software Engineering Large Practical
  • 26. Useful functions .11.56.png Stephen Gilmore Software Engineering Large Practical
  • 27. API demos .05.43.png Stephen Gilmore Software Engineering Large Practical
  • 28. API demos .06.09.png Stephen Gilmore Software Engineering Large Practical
  • 29. API demos .06.17.png Stephen Gilmore Software Engineering Large Practical
  • 30. Auto-complete contacts .09.29.png Stephen Gilmore Software Engineering Large Practical
  • 31. Manifest files Every Android application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest presents essential information about the application to the Android system, including information about intents which are messages sent to activities, services and broadcast receivers. The manifest also specifies permissions which the application requests (such as the permission to connect to paired Bluetooth devices) and libraries that it needs. Stephen Gilmore Software Engineering Large Practical
  • 32. Manifest files Stephen Gilmore Software Engineering Large Practical
  • 33. The manifest editor Stephen Gilmore Software Engineering Large Practical
  • 34. Adding extras .50.09.png Stephen Gilmore Software Engineering Large Practical
  • 35. Labels and icons Stephen Gilmore Software Engineering Large Practical
  • 36. Application nodes and intents .50.50.png Stephen Gilmore Software Engineering Large Practical
  • 37. Attributes for an action Stephen Gilmore Software Engineering Large Practical
  • 38. Add permissions Stephen Gilmore Software Engineering Large Practical
  • 39. Add instrumentation Stephen Gilmore Software Engineering Large Practical
  • 40. Source code view Stephen Gilmore Software Engineering Large Practical
  • 41. Source code tab .51.48.2.png Stephen Gilmore Software Engineering Large Practical
  • 42. Resources and strings An Android application may need resources such as image files and strings. A string resource provides text strings for the application with optional text styling and formatting. Stephen Gilmore Software Engineering Large Practical
  • 43. Resources and strings Stephen Gilmore Software Engineering Large Practical
  • 44. A String resource, app name Stephen Gilmore Software Engineering Large Practical
  • 45. Managing string resources Stephen Gilmore Software Engineering Large Practical
  • 46. Drawable resources Stephen Gilmore Software Engineering Large Practical
  • 47. Managing drawable resources Stephen Gilmore Software Engineering Large Practical
  • 48. Contents of app notes.png Stephen Gilmore Software Engineering Large Practical
  • 49. The icon in the launcher view Stephen Gilmore Software Engineering Large Practical
  • 50. Editing string resources String resources can be edited using the Android Resources editor. Stephen Gilmore Software Engineering Large Practical
  • 51. Application nodes Stephen Gilmore Software Engineering Large Practical
  • 52. Browsing Stephen Gilmore Software Engineering Large Practical
  • 53. Editing strings Stephen Gilmore Software Engineering Large Practical
  • 54. Updating a string Stephen Gilmore Software Engineering Large Practical
  • 55. Text in the XML view Stephen Gilmore Software Engineering Large Practical
  • 56. Updating a string in the Resources view Stephen Gilmore Software Engineering Large Practical
  • 57. The XML text is updated automatically Stephen Gilmore Software Engineering Large Practical
  • 58. Getting it wrong: editing the XML Stephen Gilmore Software Engineering Large Practical
  • 59. The bug shows up in the resources view Stephen Gilmore Software Engineering Large Practical
  • 60. Oh dear Stephen Gilmore Software Engineering Large Practical
  • 61. Android Eclipse issues Working with hand-crafted and automatically-generated Java files can be confusing. In particular we focus on errors involving the automatically-generated R.java file. Stephen Gilmore Software Engineering Large Practical
  • 62. Oh no, Java problems . . . Stephen Gilmore Software Engineering Large Practical
  • 63. “Layout cannot be resolved . . . ” Stephen Gilmore Software Engineering Large Practical
  • 64. R.java is generated so clean the project? Stephen Gilmore Software Engineering Large Practical
  • 65. No good. Delete R.java and try again? Stephen Gilmore Software Engineering Large Practical
  • 66. R.java is regenerated but errors remain Stephen Gilmore Software Engineering Large Practical
  • 67. Refresh the view? Stephen Gilmore Software Engineering Large Practical
  • 68. No good. What now? Stephen Gilmore Software Engineering Large Practical
  • 69. Close the project and reopen it? Stephen Gilmore Software Engineering Large Practical
  • 70. Reopening the project. Praying . . . Stephen Gilmore Software Engineering Large Practical
  • 71. Didn’t work :-( but look at this . . . Stephen Gilmore Software Engineering Large Practical
  • 72. Moving the folder fixes the problem :-) Stephen Gilmore Software Engineering Large Practical
  • 73. Moving the folder fixes the problem :-) Stephen Gilmore Software Engineering Large Practical