MobAppDev
Android AppDev Infrastructure
Installation, Android App Anatomy,
Building, Running, & Signing Apps
Vladimir Kuly...
Outline
●
Android AppDev Infrastructure: What is What and
What Installs Where (Most Likely)
●
Android App Anatomy: Compone...
What is What & What Installs Where (Most
Likely)
www.vkedco.blogspot.comwww.vkedco.blogspot.com
Android Root Directory
After you install Android, your Android root directory (e.g.,
E:/Android/android-sdks) will likely ...
Android Root/add-ons
●
/add-ons - 3rd
party releases of Android; add-ons may require
some licensing agreement (make sure y...
Android Root/platforms
●
/platforms – specific platforms installed on your
system (e.g., android-8, android-10, etc)
●
Eac...
Android Root/samples & /platform-tools
●
/samples – sample projects for specific platforms
●
/samples are a great way to l...
Android Root/samples & /platform-tools
●
/samples – sample projects for specific platforms
●
/samples are a great way to l...
Android Root/sources
●
/sources – source code from various companies and organizations
●
/tools are applications and libra...
Tool Access & Versions
●
Android Plugins for Eclipse make most tools available
from within IDE
●
If you are a command line...
Android App Anatomy
www.vkedco.blogspot.comwww.vkedco.blogspot.com
Greeting & Toasting
Gingerbread (Android 2.3.X)
&
Jelly Bean (Android 4.2)
download source HelloGingerbread, HelloJellyBea...
Basic HelloAndroid App with a Toast
www.vkedco.blogspot.comwww.vkedco.blogspot.com
Hello to & Toast on Gingerbread
www.vkedco.blogspot.comwww.vkedco.blogspot.com
Hello to & Toast on Jelly Bean
www.vkedco.blogspot.comwww.vkedco.blogspot.com
Android App/gen
●
/gen folder contains all auto-
generated Java source
●
You should not modify it
●
R.java is a very impor...
Android App/assets, /bin, /libs, /res
●
/assets - arbitraty user created files
or file hierarchies not available
through R...
Android App/res
●
/res folder contains XML resources and
drawables of various resolutions required for
your app
●
/res/dra...
Pushing/Pulling Files To/From Device
Open DDMS Perspective, Select Device in the left panel; click
on 'Push File To Device...
Android App Development Process
www.vkedco.blogspot.comwww.vkedco.blogspot.com
Building & Running Steps
www.vkedco.blogspot.comwww.vkedco.blogspot.com
Building & Running Apps
●
Eclipse ADT plugin builds your app incrementally as you make
changes to it (check Project | Buil...
Building & Signing Apps
Building Apps Signing Apps
www.vkedco.blogspot.comwww.vkedco.blogspot.com
Android App Anatomy
www.vkedco.blogspot.comwww.vkedco.blogspot.com
Android App/AndroidManifest.xml
●
AndroidManifest.xml is the
glue that specifies & holds
your app together
(conceptually s...
Android App/src
●
/src folder contains all your
Java source code (packages &
classes)
●
Initial Activity class with two
me...
Android App/gen
●
/gen folder contains all auto-
generated Java source
●
You should not modify it
●
R.java is a very impor...
Android App/assets, /bin, /libs, /res
●
/assets - arbitraty user created files
or file hierarchies not available
through R...
Android App/res
●
/res folder contains XML resources and
drawables of various resolutions required for
your app
●
/res/dra...
Building, Running, & Signing Android
Apps
www.vkedco.blogspot.comwww.vkedco.blogspot.com
Building & Running Steps
www.vkedco.blogspot.comwww.vkedco.blogspot.com
Building & Running Apps
●
Eclipse ADT plugin builds your app incrementally as you make
changes to it (check Project | Buil...
Building & Signing Apps
Building Apps Signing Apps
www.vkedco.blogspot.comwww.vkedco.blogspot.com
References
●
developer.android.com
●
developer.android.com/tools/building/index.html
●
http://www.youtube.com/vkedco
www.v...
Upcoming SlideShare
Loading in...5
×

MobAppDev (Fall 2013): Android AppDev Infrastructure Installation, Android App Anatomy, Building, Running, & Signing Apps

401

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
401
On Slideshare
0
From Embeds
0
Number of Embeds
25
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

MobAppDev (Fall 2013): Android AppDev Infrastructure Installation, Android App Anatomy, Building, Running, & Signing Apps

  1. 1. MobAppDev Android AppDev Infrastructure Installation, Android App Anatomy, Building, Running, & Signing Apps Vladimir Kulyukin Department of Computer Science Utah State University www.vkedco.blogspot.comwww.vkedco.blogspot.com
  2. 2. Outline ● Android AppDev Infrastructure: What is What and What Installs Where (Most Likely) ● Android App Anatomy: Components of an Android Application ● Building, Running, & Signing Android Apps www.vkedco.blogspot.comwww.vkedco.blogspot.com
  3. 3. What is What & What Installs Where (Most Likely) www.vkedco.blogspot.comwww.vkedco.blogspot.com
  4. 4. Android Root Directory After you install Android, your Android root directory (e.g., E:/Android/android-sdks) will likely look as follows (your particular installation may look somewhat different) www.vkedco.blogspot.comwww.vkedco.blogspot.com
  5. 5. Android Root/add-ons ● /add-ons - 3rd party releases of Android; add-ons may require some licensing agreement (make sure you understand licensing before adopting an add-on) ● The most important sub-directories of an add-on are: – /images – system image files for Android devices – /libs – JAR files you need to include in your projects – /skins – available looks for Android devices – /samples – if present, contains sample projects with source code www.vkedco.blogspot.comwww.vkedco.blogspot.com
  6. 6. Android Root/platforms ● /platforms – specific platforms installed on your system (e.g., android-8, android-10, etc) ● Each platform directory will have, at least, the sub- directories: /data, /images, & /skins – /data – various resources (e.g., fonts, icons, etc) – /skins – looks of devices – /images – file system images www.vkedco.blogspot.comwww.vkedco.blogspot.com
  7. 7. Android Root/samples & /platform-tools ● /samples – sample projects for specific platforms ● /samples are a great way to learn Android development tricks (many of them are not well documented: you build them, run them, & study the source, modify it, etc) ● /platform-tools are applications and libraries you need for Android development – aapt (Android Asset Packaging Tool) – adb (Android Debug Bridge) – aidl (Android Interface Definition Language compiler) www.vkedco.blogspot.comwww.vkedco.blogspot.com
  8. 8. Android Root/samples & /platform-tools ● /samples – sample projects for specific platforms ● /samples are a great way to learn Android development tricks (many of them are not well documented: you build them, run them, & study the source, modify it, etc) ● /platform-tools are applications and libraries you need for Android development – aapt (Android Asset Packaging Tool) – adb (Android Debug Bridge) – aidl (Android Interface Definition Language compiler) www.vkedco.blogspot.comwww.vkedco.blogspot.com
  9. 9. Android Root/sources ● /sources – source code from various companies and organizations ● /tools are applications and libraries you need for running and debugging Android apps – emulator – ddms (Dalvik Debug Monitor Server) – apkbuilder (APK stands for Android Package File; APK is a file format for Android application distribution; it is actually - ZIP) – hierarchyviewer (UI debugging and opitmization tool) www.vkedco.blogspot.comwww.vkedco.blogspot.com
  10. 10. Tool Access & Versions ● Android Plugins for Eclipse make most tools available from within IDE ● If you are a command line developer, think of adding /platform-tools and /tools to your PATH ● Android APIs tend to be backward compatible (modulo hardware restrictions) but some APIs do get depricated: you have to stay current on what is current on your target Android platform www.vkedco.blogspot.comwww.vkedco.blogspot.com
  11. 11. Android App Anatomy www.vkedco.blogspot.comwww.vkedco.blogspot.com
  12. 12. Greeting & Toasting Gingerbread (Android 2.3.X) & Jelly Bean (Android 4.2) download source HelloGingerbread, HelloJellyBean www.vkedco.blogspot.comwww.vkedco.blogspot.com
  13. 13. Basic HelloAndroid App with a Toast www.vkedco.blogspot.comwww.vkedco.blogspot.com
  14. 14. Hello to & Toast on Gingerbread www.vkedco.blogspot.comwww.vkedco.blogspot.com
  15. 15. Hello to & Toast on Jelly Bean www.vkedco.blogspot.comwww.vkedco.blogspot.com
  16. 16. Android App/gen ● /gen folder contains all auto- generated Java source ● You should not modify it ● R.java is a very important class that defines constants that you need to programmatically access various elements of your application www.vkedco.blogspot.comwww.vkedco.blogspot.com
  17. 17. Android App/assets, /bin, /libs, /res ● /assets - arbitraty user created files or file hierarchies not available through R.java ● /bin - .dex (Dalvik byte code), .apk and drawables ● /libs JARs for required by the app ● /res – XML and drawable resources available through R.java www.vkedco.blogspot.comwww.vkedco.blogspot.com
  18. 18. Android App/res ● /res folder contains XML resources and drawables of various resolutions required for your app ● /res/drawable-xxxx - drawables of various resolutions ● /res/layout - XML UI specs for activities ● /res/menu – XML menu specs for activities ● /res/values – XML definitions of string constants and styles www.vkedco.blogspot.comwww.vkedco.blogspot.com
  19. 19. Pushing/Pulling Files To/From Device Open DDMS Perspective, Select Device in the left panel; click on 'Push File To Device' or 'Pull File From Device' www.vkedco.blogspot.comwww.vkedco.blogspot.com
  20. 20. Android App Development Process www.vkedco.blogspot.comwww.vkedco.blogspot.com
  21. 21. Building & Running Steps www.vkedco.blogspot.comwww.vkedco.blogspot.com
  22. 22. Building & Running Apps ● Eclipse ADT plugin builds your app incrementally as you make changes to it (check Project | Build Automatically menu option) ● The .apk file is saved in the /bin folder ● It is possible to develop in non-Eclipse environments: you can use the generated build.xml Ant file in the project directory ● The app must be signed (debug or release mode) to run on an AVD or a device ● Eclipse ADT automatically signs your app in debug mode www.vkedco.blogspot.comwww.vkedco.blogspot.com
  23. 23. Building & Signing Apps Building Apps Signing Apps www.vkedco.blogspot.comwww.vkedco.blogspot.com
  24. 24. Android App Anatomy www.vkedco.blogspot.comwww.vkedco.blogspot.com
  25. 25. Android App/AndroidManifest.xml ● AndroidManifest.xml is the glue that specifies & holds your app together (conceptually similar to Unix/Linux make files) ● Specifies your app's package, minimum & target SDK versions, your application and activities inside your application www.vkedco.blogspot.comwww.vkedco.blogspot.com
  26. 26. Android App/src ● /src folder contains all your Java source code (packages & classes) ● Initial Activity class with two methods onCreate() and onCreateOptionsMenu() is auto-generated www.vkedco.blogspot.comwww.vkedco.blogspot.com
  27. 27. Android App/gen ● /gen folder contains all auto- generated Java source ● You should not modify it ● R.java is a very important class that defines constants that you need to programmatically access various elements of your application www.vkedco.blogspot.comwww.vkedco.blogspot.com
  28. 28. Android App/assets, /bin, /libs, /res ● /assets - arbitraty user created files or file hierarchies not available through R.java ● /bin - .dex (Dalvik byte code), .apk and drawables ● /libs JARs for required by the app ● /res – XML and drawable resources available through R.java www.vkedco.blogspot.comwww.vkedco.blogspot.com
  29. 29. Android App/res ● /res folder contains XML resources and drawables of various resolutions required for your app ● /res/drawable-xxxx - drawables of various resolutions ● /res/layout - XML UI specs for activities ● /res/menu – XML menu specs for activities ● /res/values – XML definitions of string constants and styles www.vkedco.blogspot.comwww.vkedco.blogspot.com
  30. 30. Building, Running, & Signing Android Apps www.vkedco.blogspot.comwww.vkedco.blogspot.com
  31. 31. Building & Running Steps www.vkedco.blogspot.comwww.vkedco.blogspot.com
  32. 32. Building & Running Apps ● Eclipse ADT plugin builds your app incrementally as you make changes to it (check Project | Build Automatically menu option) ● The .apk file is saved in the /bin folder ● It is possible to develop in non-Eclipse environments: you can use the generated build.xml Ant file in the project directory ● The app must be signed (debug or release mode) to run on an AVD or a device ● Eclipse ADT automatically signs your app in debug mode www.vkedco.blogspot.comwww.vkedco.blogspot.com
  33. 33. Building & Signing Apps Building Apps Signing Apps www.vkedco.blogspot.comwww.vkedco.blogspot.com
  34. 34. References ● developer.android.com ● developer.android.com/tools/building/index.html ● http://www.youtube.com/vkedco www.vkedco.blogspot.comwww.vkedco.blogspot.com
  1. Gostou de algum slide específico?

    Recortar slides é uma maneira fácil de colecionar informações para acessar mais tarde.

×