Android Tools and SDK Overview
Android Tools and SDK Overview
Android Tools and SDK Overview
Session 0 : Introduction
API Features
2D and 3D Graphics
Layouts and views
SQL Database
Sensors, Cameras,
Broadcast Intents and Receivers
Live desktop
Is it a guided tour?
A laundry list of tips and tricks?
A Jumping off point?
A chance to make mistakes?
A chance to meet others?
docs/
guide A comprehensive introductory guide
resources FAQs, Articles, Howtos and Best
Practices
reference javadoc (Java class documentation)
Try it!
adb logcat . Useful to have logcat running all
the time.
adb shell (then ls)
adb (will list all adb commands)
Hierarchy Viewer The Hierarchy Viewer tool allows you to debug and optimize your user interface. It provides a visual
representation of your layout's hierarchy of Views and a magnified inspector of the current display with a pixel grid, so
you can get your layout just right.
layoutopt This tool lets you quickly analyze your application's layouts for efficiency.
UI/Application Exerciser Monkey The Monkey is a program that runs on your emulator or device and generates pseudo-
random streams of user events such as clicks, touches, or gestures, as well as a number of system- level events. You can
use the Monkey to stress-test applications that you are developing, in a random yet repeatable manner
zipalign An important .apk optimization tool. This tool ensures that all uncompressed data starts with a particular alignment
relative to the start of the file. This should always be used to align .apk files after they have been signed.
Dalvik Debug Monitor Service (ddms) Integrated with Dalvik, the Android platform's custom VM, this tool lets you manage
processes on an emulator or device and assists in debugging. You can use it to kill processes, select a specific process to
debug, generate trace data, view heap and thread information, take screenshots of the emulator or device, and more.
Traceview This tool produces graphical analysis views of trace log data that you can generate from your Android application.
sqlite3 Included as a convenience, this tool lets you access the SQLite data files created and used by Android applications.
Android Emulator A QEMU-based device-emulation tool that you can use to design, debug, and test your applications in an
actual Android run-time environment.
Draw 9-patch The Draw 9-patch tool allows you to easily create a NinePatch graphic using a WYSIWYG editor. It also previews
stretched versions oft he image, and highlights the area in which content is allowed.
dx The dx tool rewrites .class bytecode into Android bytecode (stored in .dex files.)
Android Asset Packaging Tool (aapt) The aapt tool lets you create .apk files containing the binaries and resources of Android
applications. Android Interface Description Language (aidl) Lets you generate code for an interprocess interface, such as
what a service might use.
mksdcard Helps you create a disk image that you can use with the emulator, to simulate the presence of an external storage
card (such as an SD card).
src/
Your Java files for your application go here in subdirectories.
gen/
Contains Java files automatically generated such as your
R.java file.
res/
Contains app resources, such as images, layout files, string
values.
assets/ Optional
You can use it to store other raw asset files.
AndroidManifest.xml
Describes the contents of your application.
default.properties
This file contains Android project settings. Do not edit it directly
instead right-click the project folder and select "Properties".
<LinearLayout >
<ImageView > </ImageView >
<TextView > </TextView>
<TextView > </TextView>
</LinearLayout>
Output?
Everything zipped up into a single apk file
To manually install adb install chess.apk ; but lets use
Eclipse
Hands-On-Tutorial, Loeb & Angrave
04/27/17 11
2010
Images and layouts
Put
chesslayout.xml in res/layout
bishop.png in res/drawable
gen/game/chess/R.java
public final class R {
public static final class drawable {
public static final int bishop=0x7f020002;
Now Playtime