From 034d89d9a4b56014ea198bcdeaa5ad922608ae40 Mon Sep 17 00:00:00 2001
From: Scott Main For immediate application testing and debugging, you can build your application in debug mode
and immediately install it on an emulator. In debug mode, the build tools automatically sign your
@@ -83,7 +94,7 @@ ant debug
To install and run your application on an emulator, see the following section about Running on the Emulator. When you're ready to release and distribute your application to end-users, you must build your
application in release mode. Once you have built in release mode, it's a good idea to perform
@@ -172,7 +183,7 @@ ant release
been signed with the private key specified in {@code build.properties} and aligned with {@code
zipalign}. It's ready for installation and distribution. Once you have signed your application with a private key, you can install and run it on an
emulator or device. You can
@@ -181,7 +192,7 @@ ant release
installation. (On your device, be sure you have enabled
Settings > Applications > Unknown sources.) Before you can run your application on the Android Emulator, you must create an AVD.In this document
-
-
+ See also
+
c:\java\jdk1.6.0_02
- Building in debug mode
+ Building in Debug Mode
Building in release mode
+ Building in Release Mode
Once built and signed in release mode
+ Once built and signed in release mode
Running on the emulator
+ Running on the Emulator
Before you can run your application on a device, you must perform some basic setup for your device:
@@ -297,7 +308,7 @@ adb -d install path/to/your/app.apkThe ADT plugin helps you get started quickly by signing your .apk files with a debug key, prior to installing them on an emulator or development device. This means that you can quickly run your application from Eclipse without having to generate your own private key. No specific - action on your part is needed, provided ADT has access to Keytool.However, please note that if + action on your part is needed, provided ADT has access to Keytool. However, please note that if you intend to publish your application, you must sign the application with your own private key, rather than the debug key generated by the SDK tools.
diff --git a/docs/html/guide/developing/devices/managing-avds-cmdline.jd b/docs/html/guide/developing/devices/managing-avds-cmdline.jd index 6feeeb68d9b4b..867433452a7be 100644 --- a/docs/html/guide/developing/devices/managing-avds-cmdline.jd +++ b/docs/html/guide/developing/devices/managing-avds-cmdline.jd @@ -7,12 +7,25 @@ parent.link=index.htmlTo generate a list of system image targets, use this command:
@@ -67,7 +80,10 @@ id: 5 or "android-9" Skins: HVGA (default), WVGA800, WQVGA432, QVGA, WVGA854, WQVGA400 -In addition to creating AVDs with the
AVD Manager user interface,
you can also create them by passing in command line arguments to the android tool.
@@ -92,8 +108,9 @@ general characteristics offered by the AVD. The target ID is an integer assigned
android tool. The target ID is not derived from the system image name,
version, or API Level, or other attribute, so you need to run the android list targets
command to list the target ID of each system image. You should do this before you run
-the android create avd command. See the android
android create avd command. See the android
+tool documentation for more information on the command line options.
When you've selected the target you want to use and made a note of its ID, @@ -124,7 +141,45 @@ appropriately for the device that the add-on is modeling, and so prevents you from resetting the options.
-When testing your application, we recommend that you test your application in several different +AVDs, using different screen configurations (different combinations of size and density). In +addition, you should set up the AVDs to run at a physical size that closely matches an actual +device.
+ +To set up your AVDs for a specific resolution or density, follow these steps:
+ +create avd command to create a new AVD, specifying
+the --skin option with a value that references either a default
+skin name (such as "WVGA800") or a custom skin resolution (such as 240x432).
+Here's an example:
+ android create avd -n <name> -t <targetID> --skin WVGA800+
In the example above (WVGA medium density), the new AVD will emulate a 5.8" +WVGA screen.
+ +As an alternative to adjusting the emulator skin configuration, you can use
+the emulator skin's default density and add the -dpi-device option
+to the emulator command line when
+starting the AVD. For example:
emulator -avd WVGA800 -scale 96dpi -dpi-device 160+ + + +
When you create an AVD, the android tool creates a dedicated directory for it
on your development computer. The directory contains the AVD configuration file,
the user data image and SD card image (if available), and any other files
@@ -153,7 +208,7 @@ The AVD's .ini file remains in the .android directory on the network
drive, regardless of the location of the AVD directory.
-
When you are creating a new AVD that uses a standard Android system image ("Type:
platform"), the android tool lets you set hardware emulation
diff --git a/docs/html/guide/developing/projects/projects-cmdline.jd b/docs/html/guide/developing/projects/projects-cmdline.jd
index 7c3e40ef37ea7..90f88fb43e9bb 100644
--- a/docs/html/guide/developing/projects/projects-cmdline.jd
+++ b/docs/html/guide/developing/projects/projects-cmdline.jd
@@ -9,13 +9,20 @@ parent.link=index.html
If you're upgrading a project from an older version of the Android SDK or want to create a new
project from existing code, use the android update project command to update the
@@ -142,7 +149,7 @@ android update project --name <project_name> --target <target_ID>
android update project --name MyApp --target 2 --path ./MyAppProject
-
A library project is a standard Android project, so you can create a new one in the same way
as you would a new application project. Specifically, you can use the android tool
@@ -171,7 +178,7 @@ android.library=true
applications can use it, you can do so by adding a the android.library=true property
to the application's default.properties file.
A library project's manifest file must declare all of the shared components that it includes, just as would a standard Android application. For more information, see the documentation for @@ -191,7 +198,7 @@ android.library=true </manifest> -
If you want to update the build properties (build target, location) of the library project, use this command:
@@ -249,7 +256,7 @@ android.library.reference.1=path/to/library_projectC that, at build time, libraries are not merged with each other before being merged with the application. -In the manifest file of the application project, you must add declarations of all components that the application will use that are imported from a library project. For example, you must