From 75f7a2642fc2c790f8f371a0f205d6e989b4224d Mon Sep 17 00:00:00 2001
From: Scott Main
Wait! Before you can run your application on the Android Emulator, +
Before you can run your application on the Android Emulator, you must create an Android Virtual Device (AVD). An AVD is a configuration that specifies the Android platform to be used on the emulator. You can read more in the Android Virtual @@ -149,45 +149,31 @@ on running your applicaiton.
To avoid some explanation that's beyond the scope of this document, here's the -basic procedure to create an AVD:
+With ADT 0.9.2 and above, the Android AVD Manager provides a simple graphical interface
+for creating and managing AVDs. (If you're using ADT version 0.9.1 or older, you must
+use the android tool to create your AVDs—read the AVD guide to
+Creating an AVD.)
+
+
To create an AVD with the Android AVD Manager:
tools/ directory.android list targets-
This will output a list of available Android targets, such as:
--id:1 - Name: Android 1.1 - Type: platform - API level: 2 - Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P -id:2 - Name: Android 1.5 - Type: platform - API level: 3 - Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P --
Find the target that matches the Android platform upon which you'd like
- to run your application. Note the integer value of the id —
- you'll use this in the next step.
android create avd --name <your_avd_name> --target <targetID>-
Give it a name, a platform target, an SD card image (optional), and + a skin (HVGA is default).
That's it; your AVD is ready. In the next section, you'll see how the AVD is used +
Your AVD is now ready and you can close the Android AVD Manager. +In the next section, you'll see how the AVD is used when launching your application on an emulator.
-To learn more about creating and managing AVDs, please read the +
For more information about AVDs, read the Android Virtual Devices documentation.
diff --git a/docs/html/sdk/preview/features.jd b/docs/html/sdk/preview/features.jd deleted file mode 100644 index 43856deab0bae..0000000000000 --- a/docs/html/sdk/preview/features.jd +++ /dev/null @@ -1,6 +0,0 @@ -sdk.redirect=true -sdk.redirect.path=android-1.5-highlights.html - -@jd:body - - diff --git a/docs/html/sdk/preview/installing.jd b/docs/html/sdk/preview/installing.jd new file mode 100644 index 0000000000000..29c70f6e9a143 --- /dev/null +++ b/docs/html/sdk/preview/installing.jd @@ -0,0 +1,352 @@ +page.title=Installing the Android SDK +sdk.version=1.6 Early Look +sdk.date=August 2009 + +@jd:body + + +This page describes how to install the Android Early Look SDK and set up your +development environment.
+ +If you encounter any problems during installation, see the +Installation Notes at the bottom of +this page.
+ +If you have already developed applications using an earlier version +of the Android SDK, please read Upgrading the SDK, instead. +
+ + +Before you begin, take a moment to confirm that your development machine meets the +System Requirements. +
+ +If you will be developing on Eclipse with the Android Development +Tools (ADT) Plugin — the recommended path if you are new to +Android — make sure that you have a suitable version of Eclipse +installed on your computer (3.4 or newer is recommended). If you need to install Eclipse, you can +download it from this location:
+ +http://www.eclipse.org/downloads/
+ +A Java or RCP version of Eclipse is recommended.
+ +Unpack the Android SDK .zip archive to a suitable location on your machine.
+By default, the SDK files are unpacked into a directory named
+android_sdk_<platform>_<release>.
+The directory contains a local copy of the documentation (accessible by opening
+documentation.html in your browser) and the subdirectories
+tools/, add-ons/, platforms/, and others. Inside
+each subdirectory of platforms/ you'll find samples/, which includes
+code samples that are specific to each version of the platform.
Make a note of the name and location of the unpacked SDK directory on your system — you +will need to refer to the SDK directory later, when setting up the Android plugin or when +using the SDK tools.
+ +Optionally, you may want to add the location of the SDK's primary tools directory
+to your system PATH. The primary tools/ directory is located at the root of the
+SDK folder. Adding tools to your path lets you run Android Debug Bridge (adb) and
+the other command line tools without
+needing to supply the full path to the tools directory.
~/.bash_profile or ~/.bashrc file. Look
+ for a line that sets the PATH environment variable and add the
+ full path to the tools/ directory to it. If you don't
+ see a line setting the path, you can add one:export PATH=${PATH}:<your_sdk_dir>/tools.bash_profile and
+ proceed as for Linux. You can create the .bash_profile if
+ you haven't already set one up on your machine. tools/ directory to the path. Note that, if you update your SDK in the future, you
+should remember to update your PATH settings to point to the new location, if different.
If you will be using the Eclipse IDE as your development environment, +the next section describes how to install the Android Development Tools (ADT) plugin and set up Eclipse. +If you choose not to use Eclipse, you can +develop Android applications in an IDE of your choice and then compile, debug and deploy using +the tools included in the SDK (skip to Next Steps).
+ + +Android offers a custom plugin for the Eclipse IDE, called Android +Development Tools (ADT), that is designed to give you a powerful, +integrated environment in which to build Android applications. It +extends the capabilites of Eclipse to let you quickly set up new Android +projects, create an application UI, add components based on the Android +Framework API, debug your applications using the Android SDK tools, and even export +signed (or unsigned) APKs in order to distribute your application.
+ +In general, using Eclipse with ADT is a highly recommended +approach to Android development and is the fastest way to get started. +(If you prefer to work in an IDE other than Eclipse, +you do not need to install Eclipse or ADT, instead, you can directly +use the SDK tools to build and debug your application—skip to Next Steps.)
+ +Once you have Eclipse installed, as described in Preparing for +Installation, follow the steps below to +download the ADT plugin and install it in your respective Eclipse +environment.
+ +| Eclipse 3.3 (Europa) | Eclipse 3.4 (Ganymede) |
|---|---|
+
+
|
+
+
+
+
|
+
Now modify your Eclipse preferences to point to the Android SDK directory:
+Done! If you haven't encountered any problems, then you're ready to +begin developing Android applications. See the +Next Steps section for suggestions on how to start.
+ + ++If you are having trouble downloading the ADT plugin after following the steps above, here are +some suggestions:
+ +http://dl-ssl.google.com/android/eclipse/
+If you are still unable to use Eclipse to download the ADT plugin as a remote update site, you +can download the ADT zip file to your local machine and manually install the it: +
+To update your plugin once you've installed using the zip file, you will have to +follow these steps again instead of the default update instructions.
+ +Note that there are features of ADT that require some optional +Eclipse components (for example, WST). If you encounter an error when +installing ADT, your Eclipse installion might not include these components. +For information about how to quickly add the necessary components to your +Eclipse installation, see the troubleshooting topic +ADT +Installation Error: "requires plug-in org.eclipse.wst.sse.ui".
+ +If you encounter this error when installing the ADT Plugin for Eclipse: +
+An error occurred during provisioning. +Cannot connect to keystore. +JKS+
+...then your development machine lacks a suitable Java VM. Installing Sun +Java 6 will resolve this issue and you can then reinstall the ADT +Plugin.
+ + +Once you have completed installation, you are ready to +begin developing applications. Here are a few ways you can get started:
+ +Learn about Android
+Explore the SDK
+Explore some code
+<sdk>/platforms/<platfrom>/samples,
+ then compile and run it in your development environmentVisit the Android developer groups
+ia32-libs package using
+ apt-get::
+ apt-get install ia32-libs+
apt-get install sun-java6-bin
The sections below describe the system and software requirements for developing +Android applications using the Android SDK tools included in Android + SDK, Release .
+ +Note: If JDK is already installed on your development computer, please take a moment to make sure that it meets the version requirements listed above. In +particular, note that some Linux distributions may include JDK 1.4 or Gnu Compiler for Java, both of which are not supported for Android development.
\ No newline at end of file diff --git a/docs/html/sdk/preview/upgrading.jd b/docs/html/sdk/preview/upgrading.jd new file mode 100644 index 0000000000000..99159fbf0fb92 --- /dev/null +++ b/docs/html/sdk/preview/upgrading.jd @@ -0,0 +1,257 @@ +page.title=Upgrading the SDK +sdk.version=1.6 Early Look +@jd:body + + +This document describes how to move your development environment and existing +Android applications from an Android 1.5 SDK to the Android 1.6 Early Look SDK. +If you are migrating applications from an SDK older than 1.5, please also read the upgrading +document available in the Android 1.5 SDK package.
+ +There are several compelling reasons to upgrade, such as new SDK tools +that make developing more efficient and new APIs that allow you to expand the feature-set +of your applications. However, even if you or your applications don't require these enhancements, +it's important that you upgrade to ensure that your applications run properly on the upcoming +Android platform.
+ +The Android 1.6 platform will soon be deployable to devices around the world. +If you have already released Android applications to the public, you should +test the forward-compatibility of your applications on the latest version of the platform +as soon as possible. It's unlikely that you'll encounter breakage in your applications, but +in the interest of maintaining the best user experience, you should take no risks. +So, please install the new Android SDK and test your applications on the new platform.
+ + + +Now that you have the Android 1.6 Early Look SDK, +you need to perform some of the regular installation steps.
+ + +If you had previously setup your PATH variable to point to the SDK tools directory,
+then you need to update it to point to the new SDK. For example, for a
+.bashrc or .bash_profile file:
export PATH=$PATH:<your_sdk_dir>/tools+ + +
If you don't use Eclipse for development, +skip to Update Your Projects.
+ + + +A new ADT plugin (version 0.9.2) is required for the Android 1.6 Early Look SDK. +With ADT 0.9.2, you can still compile your applications against +multiple platform versions, such as Android 1.5. However, previous versions +of ADT will not work with the Android 1.6 Early Look SDK, so you must upgrade +to ADT 0.9.2.
+ +If you're currently using a version of ADT older than version 0.9, then you must +uninstall ADT before you proceed (read how to +Uninstall +your previous ADT plugin). If you currently have version 0.9 or 0.9.1, then you don't +need to uninstall and can continue with the procedure below.
+ +To install the new ADT plugin, follow the steps below for your respective version of Eclipse.
+ +| Eclipse 3.3 (Europa) | Eclipse 3.4 (Ganymede) |
|---|---|
+
+
|
+
+
+
|
+
If you encounter problems with this update procedure, try performing a fresh installation. +Ensure your current ADT is fully uninstalled and then +follow the guide to Installing the ADT Plugin +for Eclipse.
+ +The last step is to update your Eclipse preferences to point to the new SDK directory:
+Now that you have installed the Android 1.6 Early Look SDK, we encourage you +to run each of your applications in an instance +of the emulator that's running the new Android 1.6 system image. It's possible (however, unlikely) +that you'll encounter unexpected behavior in your application when you run your applications on +the new system image. Whether you believe your application will be affected by +platform changes or not, it's very important that you test the application's +forward-compatibility.
+ +To test forward-compatibility, simply run your application, as-is, on an instance of the Android +Emulator that uses an AVD targeted to "Android Donut (Preview)":
+ +For more information on creating an AVD and launching your application refer to the +Eclipse guide to +Running Your Application or the +Ant guide to +Running Your Application, depending on your development environment.
+ + +If you want to fully utilize new APIs introduced with the Android 1.6 Early Look SDK, +then you'll need to convert your application to compile against the new "Donut" platform.
+ +First, you need to change the value of the minSdkVersion attribute in
+the <uses-sdk> manifest element. While
+running your application against the Donut platform included with the Early Look SDK, you
+must set the minSdkVersion value to "Donut". For example:
+<manifest> + ... + <uses-sdk android:minSdkVersion="Donut" /> + ... +</manifest> ++ +
This value is required only while compiling against the Donut platform included with +the Android 1.6 Early Look SDK. Once the final SDK is made +available for Android 1.6, you will need to change this value. +For more information, read about the Framework API and +Provisional API Level.
+ +Once you've changed the minSdkVersion value in your application's manifest,
+continue with the procedures below to convert your applications.
Remember that you must create an AVD that targets the same platform in order to run the emulator. + Continue with the + Eclipse guide to + Running Your Application. During the procedure to Running Your Application, select a "deployment + target" or the AVD that includes the "Donut" platform. If your application utilizes the Google Maps APIs (i.e., + MapView), be certain to select a target that includes the Google APIs.
+ + +Use the android tool (located in your_sdk/tools/)
+ to create a new build.xml that references
+ the new platform target. To see a list of available targets, execute:
android list targets+ +
Select the target id that corresponds to the "Donut" platform and pass it with the
+ --target parameter when updating your project. For example:
android update project --path /path/to/my-project --target 2+ +
Remember that you must create an Android Virtual Device (AVD) that's targeted to the + same platform before you can run the updated application an instance + of the emulator. Please continue with the + Ant guide to + Running Your Application. During the procedure to Running Your Application, select a "deployment + target" for the AVD that includes the "Donut" platform. + If your application utilizes the Google Maps APIs (i.e., + MapView), be certain to select a target that includes the Google APIs.
+ + +If you have additional trouble updating your code, visit the +Android Developers Group +to seek help from other Android developers.
+