diff --git a/docs/html/sdk/installing/installing-adt.jd b/docs/html/sdk/installing/installing-adt.jd deleted file mode 100644 index b89c068b4b661..0000000000000 --- a/docs/html/sdk/installing/installing-adt.jd +++ /dev/null @@ -1,160 +0,0 @@ -page.title=Installing the Eclipse Plugin -adt.zip.version=23.0.6 -adt.zip.download=ADT-23.0.6.zip -adt.zip.bytes=103344298 -adt.zip.checksum=f64b7e50c84799f41c642218c35f1bbe - -@jd:body - - -

- Important: Support for the Android Developer Tools (ADT) in Eclipse is ending, - per our announcement. You should migrate your app development projects to - Android Studio as soon as possible. For more information on transitioning to Android Studio, see - Migrating to Android Studio. -

- -

Android offers a custom plugin for the Eclipse IDE, called Android -Development Tools (ADT). This plugin provides a powerful, integrated -environment in which to develop Android apps. It extends the capabilities -of Eclipse to let you quickly set up new Android projects, build an app -UI, debug your app, and export signed (or unsigned) app packages (APKs) for distribution. -

- -

You should install the ADT plugin -only if you already have an Eclipse installation that you want to continue using. -Your existing Eclipse installation must meet these requirements:

- - - -

Download the ADT Plugin

- -

To add the ADT plugin to Eclipse:

-
    -
  1. Start Eclipse, then select Help > Install New -Software.
  2. -
  3. Click Add, in the top-right corner.
  4. -
  5. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the -following URL for the Location: -
    https://dl-ssl.google.com/android/eclipse/
    -

    Note: The Android Developer Tools update site requires - a secure connection. Make sure the update site URL you enter starts with HTTPS.

    -
  6. -
  7. Click OK.
  8. -
  9. In the Available Software dialog, select the checkbox next to Developer Tools and click -Next.
  10. -
  11. In the next window, you'll see a list of the tools to be downloaded. Click -Next.
  12. -
  13. Read and accept the license agreements, then click Finish. -

    If you get a security warning saying that the authenticity or validity of -the software can't be established, click OK.

  14. -
  15. When the installation completes, restart Eclipse.
  16. -
- - - -

Configure the ADT Plugin

- -

Once Eclipse restarts, you - must specify the location of your Android SDK directory:

- -
    -
  1. In the "Welcome to Android Development" window that appears, select Use -existing SDKs.
  2. -
  3. Browse and select the location of the Android SDK directory you recently -downloaded and unpacked.
  4. -
  5. Click Next.
  6. -
- -

Your Eclipse IDE is now set up to develop Android apps, but you need to add -the latest SDK platform tools and an Android platform to your environment. -To get these packages for your SDK, continue to -Adding Platforms and Packages.

- - -

Troubleshooting ADT Installation

- -

If you are having trouble downloading the ADT plugin after following the -steps above and you are behind a firewall (such as a corporate firewall), make sure that -you have properly configured your proxy settings in Eclipse. In Eclipse, -you can configure proxy information from the main Eclipse menu in -Window (on Mac OS X, Eclipse) > -Preferences > General > Network -Connections. -

- -

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 it:

- -
    -
  1. Download the ADT Plugin zip file (do not unpack it): - - - - - - - - - - - - -
    PackageSizeMD5 Checksum
    - {@adtZipDownload} - {@adtZipBytes} bytes{@adtZipChecksum}
    -
  2. - - -
  3. Start Eclipse, then select Help > Install New -Software.
  4. -
  5. Click Add, in the top-right corner.
  6. -
  7. In the Add Repository dialog, click Archive.
  8. -
  9. Select the downloaded {@adtZipDownload} file and click OK.
  10. -
  11. Enter "ADT Plugin" for the name and click OK. -
  12. In the Available Software dialog, select the checkbox next to Developer Tools and click -Next.
  13. -
  14. In the next window, you'll see a list of the tools to be downloaded. Click -Next.
  15. -
  16. Read and accept the license agreements, then click Finish. -

    If you get a security warning saying that the authenticity or validity of -the software can't be established, click OK.

  17. -
  18. When the installation completes, restart Eclipse.
  19. -
- -

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.

- -

Other install errors

- -

Note that there are features of ADT that require some optional -Eclipse packages (for example, WST). If you encounter an error when -installing ADT, your Eclipse installation might not include these packages. -For information about how to quickly add the necessary packages to your -Eclipse installation, see the troubleshooting topic -ADT -Installation Error: "requires plug-in org.eclipse.wst.sse.ui".

- -

For Linux users

-

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.

- diff --git a/docs/html/sdk/installing/migrate.jd b/docs/html/sdk/installing/migrate.jd index 6dedad6d52c07..61e6798dc0e55 100644 --- a/docs/html/sdk/installing/migrate.jd +++ b/docs/html/sdk/installing/migrate.jd @@ -1,4 +1,4 @@ -page.title=Migrating to Android Studio +page.title=Migrating from Eclipse ADT @jd:body diff --git a/docs/html/tools/building/building-cmdline-ant.jd b/docs/html/tools/building/building-cmdline-ant.jd deleted file mode 100644 index add6ca26c558b..0000000000000 --- a/docs/html/tools/building/building-cmdline-ant.jd +++ /dev/null @@ -1,389 +0,0 @@ -page.title=Building and Running from the Command Line -parent.title=Building and Running -parent.link=index.html -@jd:body - -
-
-

In this document

-
    -
  1. Building in Debug Mode
  2. -
  3. Building in Release Mode -
      -
    1. Build unsigned
    2. -
    3. Build signed and aligned
    4. -
    5. Once built and signed in release mode
    6. -
    -
  4. -
  5. Running on the Emulator
  6. -
  7. Running on a Device
  8. -
  9. Application Signing
  10. -
  11. Ant Command Reference
  12. -
-

See also

-
    -
  1. Managing AVDs from -the Command Line
  2. -
  3. Using the Android -Emulator
  4. -
  5. Signing Your Applications
  6. -
-
-
- -

- Important: Support for Ant as a build tool for Android is ending, per our - announcement. You should migrate your app development projects to - Android Studio and Gradle as soon as possible. For more information on transitioning to these - tools, see Migrating to Android Studio. -

- -

There are two ways to build your application using the Ant build script: one for - testing/debugging your application — debug mode — and one for building your - final package for release — release mode. Regardless of which way you build your application, - it must be signed before it can install on an emulator or device—with a debug key when building - in debug mode and with your own private key when building in release mode.

- -

Whether you're building in debug mode or release mode, you need to use the Ant tool to compile - and build your project. This will create the .apk file that you can install on an emulator or device. - When you build in debug mode, the .apk file is automatically signed by the SDK tools with - a debug key, so it's instantly ready for installation onto an emulator or attached - development device. You cannot distribute an application that is signed with a debug key. - When you build in release mode, the .apk file is unsigned, so you - must manually sign it with your own private key, using Keytool and Jarsigner.

- -

It's important that you read and understand Signing Your Applications, particularly once - you're ready to release your application and share it with end-users. That document describes the - procedure for generating a private key and then using it to sign your .apk file. If you're just - getting started, however, you can quickly run your applications on an emulator or your own - development device by building in debug mode.

- -

If you don't have Ant, you can obtain it from the Apache Ant - home page. Install it and make sure it is in your executable PATH. Before calling Ant, you - need to declare the JAVA_HOME environment variable to specify the path to where the JDK is - installed.

- -

Note: When installing JDK on Windows, the default is to install - in the "Program Files" directory. This location will cause ant to fail, because of - the space. To fix the problem, you can specify the JAVA_HOME variable like this: -

set JAVA_HOME=c:\Progra~1\Java\<jdkdir>
- -

The easiest solution, however, is to install JDK in a non-space directory, for example:

- -
c:\java\jdk1.7
- -

Building in Debug Mode

- -

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 - application with a debug key and optimize the package with {@code zipalign}.

- -

To build in debug mode:

- -
    -
  1. Open a command-line and navigate to the root of your project directory.
  2. -
  3. Use Ant to compile your project in debug mode: -
    -ant debug
    -
    - -

    This creates your debug .apk file inside the project bin/ directory, named - <your_project_name>-debug.apk. The file is already signed with - the debug key and has been aligned with - zipalign. -

    -
  4. -
- -

Each time you change a source file or resource, you must run Ant again in order to package up - the latest version of the application.

- -

To install and run your application on an emulator, see the following section about Running on the Emulator.

- -

Building in Release Mode

- -

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 - additional testing and debugging with the final .apk.

- -

Before you start building your application in release mode, be aware that you must sign the - resulting application package with your private key, and should then align it using the {@code - zipalign} tool. There are two approaches to building in release mode: build an unsigned package - in release mode and then manually sign and align the package, or allow the build script to sign - and align the package for you.

- -

Build unsigned

- -

If you build your application unsigned, then you will need to manually sign and align - the package.

- -

To build an unsigned .apk in release mode:

- -
    -
  1. Open a command-line and navigate to the root of your project directory.
  2. - -
  3. Use Ant to compile your project in release mode: -
    -ant release
    -
    -
  4. -
- -

This creates your Android application .apk file inside the project bin/ - directory, named <your_project_name>-unsigned.apk.

- -

Note: The .apk file is unsigned at this point and can't - be installed until signed with your private key.

- -

Once you have created the unsigned .apk, your next step is to sign the .apk with your private - key and then align it with {@code zipalign}. To complete this procedure, read Signing Your Applications.

- -

When your .apk has been signed and aligned, it's ready to be distributed to end-users. - You should test the final build on different devices or AVDs to ensure that it - runs properly on different platforms.

- -

Build signed and aligned

- -

If you would like, you can configure the Android build script to automatically sign and align - your application package. To do so, you must provide the path to your keystore and the name of - your key alias in your project's {@code ant.properties} file. With this information provided, - the build script will prompt you for your keystore and alias password when you build in release - mode and produce your final application package, which will be ready for distribution.

- -

Caution: Due to the way Ant handles input, the password that - you enter during the build process will be visible. If you are concerned about - your keystore and alias password being visible on screen, then you may prefer to perform the - application signing manually, via Jarsigner (or a similar tool). To instead perform the signing - procedure manually, build unsigned and then continue with - Signing Your Applications.

- -

To specify your keystore and alias, open the project {@code ant.properties} file (found in - the root of the project directory) and add entries for {@code key.store} and {@code key.alias}. - For example:

-
-key.store=path/to/my.keystore
-key.alias=mykeystore
-
- -

Save your changes. Now you can build a signed .apk in release mode:

- -
    -
  1. Open a command-line and navigate to the root of your project directory.
  2. - -
  3. Use Ant to compile your project in release mode: -
    -ant release
    -
    -
  4. - -
  5. When prompted, enter you keystore and alias passwords. - -

    Caution: As described above, your password will be - visible on the screen.

    -
  6. -
- -

This creates your Android application .apk file inside the project bin/ - directory, named <your_project_name>-release.apk. This .apk file has - been signed with the private key specified in {@code ant.properties} and aligned with {@code - zipalign}. It's ready for installation and distribution.

- -

Once built and signed in release mode

- -

Once you have signed your application with a private key, you can install and run it on an - emulator or device. You can - also try installing it onto a device from a web server. Simply upload the signed .apk to a web - site, then load the .apk URL in your Android web browser to download the application and begin - installation. (On your device, be sure you have enabled - Settings > Applications > Unknown sources.)

- -

Running on the Emulator

- -

Before you can run your application on the Android Emulator, you must create an AVD.

- -

To run your application:

- -
    -
  1. - Open the AVD Manager and launch a virtual device - -

    From your SDK's platform-tools/ directory, execute the {@code android} tool -with the avd options:

    -
    -android avd
    -
    - -

    In the Virtual Devices view, select an AVD and click Start.

    -
  2. - -
  3. - Install your application - -

    From your SDK's tools/ directory, install the {@code .apk} on the - emulator:

    -
    -adb install <path_to_your_bin>.apk
    -
    - -

    Your .apk file (signed with either a release or debug key) is in your project {@code bin/} - directory after you build your application.

    - -

    If there is more than one emulator running, you must specify the emulator upon which to - install the application, by its serial number, with the -s option. For - example:

    -
    -adb -s emulator-5554 install path/to/your/app.apk
    -
    - -

    To see a list of available device serial numbers, execute {@code adb devices}.

    -
  4. -
- -

If you don't see your application on the emulator, try closing the emulator and launching the - virtual device again from the AVD Manager. Sometimes when you install an application for the - first time, it won't show up in the application launcher or be accessible by other applications. - This is because the package manager usually examines manifests completely only on emulator - startup.

- -

Be certain to create multiple AVDs upon which to test your application. You should have one - AVD for each platform and screen type with which your application is compatible. For instance, if - your application compiles against the Android 4.0 (API Level 14) platform, you should create an - AVD for each platform equal to and greater than 4.0 and an AVD for each screen type you support, then test your - application on each one.

- -

Tip: If you have only one emulator running, you can - build your application and install it on the emulator in one simple step. Navigate to the root of - your project directory and use Ant to compile the project with install mode: ant - install. This will build your application, sign it with the debug key, and install it on - the currently running emulator.

- -

Running on a Device

- -

Before you can run your application on a device, you must perform some basic setup for your - device:

- - - -

Read Setting up a Device for - Development for more information.

- -

Once your device is set up and connected via USB, navigate to your SDK's platform-tools/ - directory and install the .apk on the device:

-
-adb -d install path/to/your/app.apk
-
- -

The {@code -d} flag specifies that you want to use the attached device (in case you also have - an emulator running).

- -

For more information on the tools used above, please see the following documents:

- - - -

Application Signing

- -

As you begin developing Android applications, understand that all Android applications must be - digitally signed before the system will install them on an emulator or device. There are two ways - to do this: with a debug key (for immediate testing on an emulator or development - device) or with a private key (for application distribution).

- -

The Android build tools help you get started by automatically signing your .apk files with a - debug key at build time. This means that you can compile your application and install it on the - emulator without having to generate your own private key. 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.

- -

The 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 - 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.

- -

Please read Signing Your - Applications, which provides a thorough guide to application signing on Android and what it - means to you as an Android application developer. The document also includes a guide to exporting - and signing your application with the ADT's Export Wizard.

- -

Ant Command Reference

-
ant clean
-
Cleans the project. If you include the all target before clean -(ant all clean), other projects are also cleaned. For instance if you clean a -test project, the tested project is also cleaned.
- -
ant debug
-
Builds a debug package. Works on application, library, and test projects and compiles - dependencies as needed.
- -
ant emma debug
-
Builds a test project while building the tested project with instrumentation turned on. - This is used to run tests with code coverage enabled.
- -
ant release
-
Builds a release package.
- -
ant instrument -
-
Builds an instrumented debug package. This is generally called automatically when building a - test project with code coverage enabled (with the emma - target)
- -
ant <build_target> install
-
Builds and installs a package. Using install by itself fails.
- -
ant installd
-
Installs an already compiled debug package. This fails if the .apk is not - already built.
- -
ant installr
-
Installs an already compiled release package. This fails if the .apk is not - already built.
- -
ant installt
-
Installs an already compiled test package. Also installs the .apk of the - tested application. This fails if the .apk is not already built.
- -
ant installi
-
Installs an already compiled instrumented package. This is generally not used manually as - it's called when installing a test package. This fails if the .apk is not already - built.
- -
ant test
-
Runs the tests (for test projects). The tested and test .apk files must be - previously installed.
- -
ant debug installt test
-
Builds a test project and the tested project, installs both .apk files, and - runs the tests.
- -
ant emma debug install test
-
Builds a test project and the tested project, installs both .apk files, and - runs the tests with code coverage enabled.
- diff --git a/docs/html/tools/building/building-eclipse.jd b/docs/html/tools/building/building-eclipse.jd deleted file mode 100644 index 89c3e166c99ec..0000000000000 --- a/docs/html/tools/building/building-eclipse.jd +++ /dev/null @@ -1,176 +0,0 @@ -page.title=Building and Running from Eclipse with ADT -parent.title=Building and Running -parent.link=index.html -@jd:body - -
-
-

In this document

- -
    -
  1. Running on an Emulator
  2. - -
  3. Running on a Device
  4. - -
  5. Creating a Run Configuration
  6. -
-
-
- -

Eclipse and ADT provide an environment where most of the details of the build process are - hidden from you. By default, the build process constantly runs in the background as you make - changes to your project.

- -

When Eclipse automatically builds your application, it enables debugging and signs the - .apk with a debug key, by default. When you run the application, - Eclipse invokes ADB and installs your application to a device or emulator, so you do not have to - manually perform these tasks. Since most of the build process is taken care of by Eclipse, the - following topics show you how to run an application, which will automatically build your - application as well.

- -

To distribute your application, however, you must build your application in release mode and - sign the .apk file with your own private key.

- -

This document shows you how to run your application on an emulator or a real device - from Eclipse—all of which is done using the debug version of your application. - For more information about how to sign your application with a private key for release, see Signing Your Applications

- -

Running on the emulator

- -

Before you can run your application on the Android Emulator, you must create an AVD.

- -

To run (or debug) your application, select Run > Run (or - Run > Debug) from the Eclipse menu bar. The ADT plugin will - automatically create a default run configuration for the project. Eclipse will then perform the - following:

- -
    -
  1. Compile the project (if there have been changes since the last build).
  2. - -
  3. Create a default run configuration (if one does not already exist for the project).
  4. - -
  5. Install and start the application on an emulator (or device), based on the Deployment - Target defined by the run configuration. - -

    By default, Android run configurations use an "automatic target" mode for selecting a - device target. For information on how automatic target mode selects a deployment target, see - Automatic and manual target modes below.

    -
  6. -
- -

If you run the application with the Debug option, the application will start in the "Waiting For Debugger" mode. Once the debugger - is attached, Eclipse opens the Debug perspective and starts the application's main activity. Otherwise, if you run the - application with the normal Run option, Eclipse installs the application on the device and launches the main activity.

- -

To set or change the run configuration used for your project, use the run configuration - manager. See the section below about Creating a Run Configuration for more information.

- -

Be certain to create multiple AVDs upon which to test your application. You should have one - AVD for each platform and screen type with which your application is compatible. For instance, if - your application compiles against the Android 4.0 (API Level 14) platform, you should create an - AVD for each platform equal to and greater than 4.0 and an AVD for each screen type you support, then test your - application on each one.

- -

Running on a device

- -

Before you can run your application on a device, you must perform some basic setup for your - device:

- - - -

Read Using Hardware Devices - for more information.

- -

Once set up and your device is connected via USB, install your application on the device by - selecting Run > Run (or Run > - Debug) from the Eclipse menu bar.

- -

Creating a Run Configuration

- -

The run configuration specifies the project to run, the Activity to start, the emulator or - connected device to use, and so on. When you first run a project as an Android - Application, ADT will automatically create a run configuration. The default run - configuration will launch the default project Activity and use automatic target mode for device - selection (with no preferred AVD). If the default settings don't suit your project, you can - customize the run configuration or even create a new one.

- -

To create or modify a run configuration, refer to the Eclipse documentation on how to create Run configurations. - The following steps highlight the important things you need to do for an Android project:

- -
    -
  1. Open the run configuration manager from the Run Menu.
  2. - -
  3. Expand the Android Application item and create a new configuration or open - an existing one. -
  4. - -
  5. With the Run Configuration selected, adjust your desired run configuration settings: - -
  6. -
- -

Automatic and manual target modes

- -

By default, a run configuration uses the automatic target mode in order to - select an AVD. In this mode, ADT will select an AVD for the application in the following - manner:

- -
    -
  1. If there's a device or emulator already running and its AVD configuration meets the - requirements of the application's build target, the application is installed and run upon - it.
  2. - -
  3. If there's more than one device or emulator running, each of which meets the requirements - of the build target, a "device chooser" is shown to let you select which device to use.
  4. - -
  5. If there are no devices or emulators running that meet the requirements of the build - target, ADT looks at the available AVDs. If there is an AVD that matches the build target of the - project, ADT chooses that AVD. If the AVD versions are newer than the build target of the project, - ADT chooses the oldest possible version of an AVD that meets the project's build target - requirement.
  6. - -
  7. If there are no suitable AVDs, the application is not installed a console error warning tells - you that there is no existing AVD that meets the build target requirements.
  8. -
- -

However, if a "preferred AVD" is selected in the run configuration, then the application will - always be deployed to that AVD. If it's not already running, then a new emulator will be - launched.

- -

If your run configuration uses manual mode, then the "device chooser" is - presented every time that your application is run, so that you can select which AVD to use.

diff --git a/docs/html/tools/debugging/debugging-projects.jd b/docs/html/tools/debugging/debugging-projects.jd deleted file mode 100644 index 2283f8be9f6dd..0000000000000 --- a/docs/html/tools/debugging/debugging-projects.jd +++ /dev/null @@ -1,67 +0,0 @@ -page.title=Debugging from Eclipse with ADT -parent.title=Debugging -parent.link=index.html -@jd:body - -
-
-

In this document

- -
    -
  1. The Debug Perspective
  2. - -
  3. The DDMS Perspective
  4. -
-
-
- -

If you are developing in Eclipse with the ADT plugin, you can use the built-in Java Debugger, - along with DDMS, to debug your applications. To access the debugger and - DDMS, Eclipse displays the debugger and DDMS features as perspectives, which are customized - Eclipse views that display certain tabs and windows depending on the perspective that you are in. - Eclipse also takes care of starting the ADB host daemon for you, so you do not have to run this - manually.

- -

The Debug Perspective in Eclipse

- -

The Debug Perspective in Eclipse gives you access to the following tabs:

- - -

You can access the Debug Perspective by clicking Window > Open Perspective > - Debug. Refer to the appropriate documentation for the Eclipse debugger for more - information.

- -

The DDMS Perspective

-

The DDMS Perspective in Eclipse lets you access all of the features - of DDMS from within the Eclipse IDE. The following sections of DDMS are available to you:

- - -

To access the DDMS perspective, go to Window > Open Perspective > - DDMS. If DDMS does not appear, go to Window > Open Perspective > Other - ... and select DDMS from the Open Perspective window that appears. For - more information on using DDMS, see Using the Dalvik Debug Monitor Server. -

\ No newline at end of file diff --git a/docs/html/tools/help/adt.jd b/docs/html/tools/help/adt.jd index 0fac62d332e7d..7d29d02ce5b43 100644 --- a/docs/html/tools/help/adt.jd +++ b/docs/html/tools/help/adt.jd @@ -2,540 +2,23 @@ page.title=Android Developer Tools page.tags=adt @jd:body -
-
-

In this document

- -
    -
  1. SDK Tools Integration
  2. - -
  3. Code Editors -
      -
    1. Resource linking enhancements
    2. -
    -
  4. - -
  5. Graphical Layout Editor -
      -
    1. Canvas and outline view
    2. -
    3. Palette
    4. -
    5. Configuration chooser
    6. -
    -
  6. - -
  7. Layout Factoring Support
  8. -
  9. Updating the ADT Plugin
  10. - -
-
-
-

- Important: Support for the Android Developer Tools (ADT) in Eclipse is ending, + Important: Support for the Android Developer Tools (ADT) in Eclipse has ended, per our announcement. You should migrate your app development projects to Android Studio as soon as possible. For more information on transitioning to Android Studio, see - Migrating to Android Studio. + Migrating from Eclipse ADT.

-

Android Developer Tools (ADT) is a plugin for Eclipse that provides a suite of - tools that are integrated with the Eclipse IDE. It offers you access to many features that help - you develop Android applications. ADT - provides GUI access to many of the command line SDK tools as well as a UI design tool for rapid - prototyping, designing, and building of your application's user interface.

+

Formerly the official IDE solution for Android development, Android Developer Tools (ADT) + is a plugin for Eclipse that provides GUI-based access to many of the command-line SDK tools, + along with a UI design tool for rapid prototyping, designing, and building of your app's + user interface.

-

If you still wish to use the ADT plugin for Eclipse, see -Installing Eclipse Plugin. -

- - -

SDK Tools Integration

- - - -

Many of the tools that you can start or run from the command line are integrated into ADT. - They include:

- - - -

Code Editors

- -

In addition to Eclipse's standard editor features, ADT provides custom XML editors to help - you create and edit Android manifests, resources, menus, and layouts in a form-based or graphical - mode. Double-clicking on an XML file in Eclipse's package explorer opens the - appropriate XML editor. - -

- -

Note: You can edit Android-specific XML files (such as a layout -or manifest) in both a graphical mode and also an XML markup mode. You can switch between -these modes with the pair of tabs at the bottom of each custom XML editor.

- -

In addition, some special file types that don't have custom editors, such as drawables, animations, - and color files offer editing enhancements such as XML tag completion.

- -

ADT provides the following custom, form-based XML editors:

- -
- -
Graphical Layout Editor
- -
Edit and design your XML layout files with a drag and drop interface. The layout editor - renders your interface as well, offering you a preview as you design your layouts. This editor - is invoked when you open an XML file with a view declared (usually declared in - res/layout. For more information, see Graphical Layout - Editor.
- -
Android Manifest Editor
- -
Edit Android manifests with a simple graphical interface. This editor is invoked - when you open an AndroidManifest.xml file.
- -
Menu Editor
- -
Edit menu groups and items with a simple graphical interface. This editor is - invoked when you open an XML file with a <menu> declared (usually located in - the res/menu folder).
- -
Resources Editor
- -
Edit resources with a simple graphical interface. This editor is invoked when - you open an XML file with a <resources> tag declared.
- -
XML Resources Editor
- -
Edit XML resources with a simple graphical interface. This editor is invoked - when you open an XML file.
-
- - -

Resource linking enhancements

-

In addition to the normal code editing features of Eclipse, ADT provides enhancements to the Android - development experience that allow you to quickly jump to declarations of various types of resources such - as strings or layout files. You can access these enhancements by holding down the control key and - clicking on the following items: - -

- -

Graphical Layout Editor

- -

ADT provides many features to allow you to design and build your application's user interface. - Many of these features are in the graphical layout editor, which you can access by opening one of - your application's XML layout files in Eclipse. +

As with ADT, support for the Ant + tool for building from the command line has ended. + Gradle is now the supported method + of building Android apps.

- -

The graphical layout editor is the main screen that you use to visually design and build your - UI. It is split up into the following parts:

- -
-
Canvas
- -
In the middle of the editor is the canvas. It provides the rendered view of your - layout and supports dragging and dropping of UI widgets - directly from the palette. You can select the platform version used to render the items in - the canvas. Each platform version has its own look and feel, which might be the similar to or - radically different from another platform version. The canvas renders the appropriate look - and feel for the currently selected platform version. - This platform version does not need to be the same as the version that your - application targets. - -

The canvas also provides - context-sensitive actions in the layout actions bar, such as adjusting layout margins and -orientation. - The layout actions bar displays available actions depending on the selected UI element in the - canvas.

-
- -
Outline
- -
On the right side of the editor is the outline view. It displays a hierarchical - view of your layout where you can do things such as reorder of views. The outline - view exposes similar functionality as the canvas but displays your layout in an ordered - list instead of a rendered preview.
- -
Palette
- -
On the left side of the editor is the palette. It provides a set of widgets that - you can drag onto the canvas. The palette shows rendered previews of the - widgets for easy lookup of desired UI widgets.
- -
Configuration Chooser
- -
At the top of the editor is the configuration chooser. - It provides options to change a layout's rendering mode or screen type.
-
- - graphical layout editor screenshot - -

Figure 1. Graphical layout editor

- -

Canvas and outline view

- - - -

The canvas is the area where you can drag and drop UI widgets from the palette to design your - layout. The canvas offers a rendered preview of your layout depending on factors such as the - selected platform version, screen orientation, and currently selected theme that you specify in - the configuration chooser. You can also drag and drop - items into the outline view, which displays your layout in a hierarchical list. The outline view - exposes much of the same functionality as the canvas but offers another method of organization - that is beneficial for ordering and quickly selecting items. When you right-click a specific item - in the canvas or outline view, you can access a context-sensitive menu that lets you modify the - following attributes of the layout or view:

- -
-
View and layout properties
- -
- When you right-click a view or layout in the canvas or outline view, it brings up a - context-sensitive menu that lets you set things such as: - - -
- -
Animation preview and creation
- -
- If your layout or view is animated, you can preview the animation directly in the canvas - (when you select Android 3.0 or later as the platform version in the configuration chooser). - Right-click an item in the canvas and select Play Animation. If - animation is not associated with item, an option is available in the menu to create one. - -

View the segment on the animation features for more - information.

-
- -
Extract as Include
- -
You can extract parts of a current layout into its own layout file, - which you can then include in any layout with a single line of XML. See Layout Refactoring Support for more information.
-
- -

Other canvas features

- -

The canvas has additional features not available in the outline view:

- - - - screenshot of the canvas - -

Figure 2. Canvas portion of the layout editor showing - a rendered preview of an application

- - screenshot of the outline view - -

Figure 3. Outline view showing current layout's structure

- -

Palette

- - - -

The palette contains the UI widgets that you can drag and drop onto the canvas and add to your - layout. The pallete categorizes the widgets and shows rendered previews - for easier lookup. The main features of the palette include:

- - - palette screenshot - -

Figure 4. Palette showing available UI widgets

- -

Configuration chooser

- - - - -

The configuration chooser allows you to create and configure different configurations of - a layout for different situations, such as one for landscape and one for portrait mode. You can - set the following options for each configuration of a layout: -

- - - - - -

Figure 5. Configuration chooser

- -

Layout Refactoring Support

- - - -

In both the graphical and XML layout editor, there are many features that help you quickly - refactor your layouts. The following list describes the major refactoring support:

- -
- -
Change layout
-
This lets you change the layout on the fly and re-renders the canvas for you. - You can apply this refactoring to any layout and the layout is converted to the new type if - possible. In many cases, the opening and closing tags of the layout's XML element are changed - along with things such as ID attributes and their references. However, for some supported - types, ADT attempts to preserve the layout, such as changing a {@link - android.widget.LinearLayout} to a {@link android.widget.RelativeLayout}.
- -
Change widget
-
This lets you select one or more widgets and converts them to a new widget type. In - addition to changing the element name, it also removes any - attributes that are not supported by the new widget type and adds in any mandatory attributes - required by the new widget type. If the current ID of a widget includes the - current widget type in its ID (such as a <Button> widget named - "button1"), then the ID is changed to match the new widget type and all - references are updated.
- -
Extract as include
-
This lets you extract views inside of an existing layout into their own separate layout - file. An include tag that points to the newly created layout file is inserted - into the existing layout file. Right-click the view or layout and select Extract as - Include....
- -
Extract string
-
Extract strings from either XML or Java files into their own separate resource file.
- -
Extract style
-
Extract style-related attributes from a layout and define them in a new - styles.xml file. You can select multiple views and this refactoring extracts all - of the same styles into one style and assigns that style to all the views that use it.
- -
Wrap-in container
-
This lets you select one or more sibling elements and wrap them in a new container. This - can be applied to the root element as well, in which case the namespace declaration attributes - will be transferred to the new root. This refactoring also transfers layout_ - attribute references to the new root, For example, suppose you have a {@link android.widget.RelativeLayout}. - If other widgets have layout constraints pointing to your widget, wrapping the widget causes - these constraints to point to the parent instead.
- -
Quick Assistant
-
Provides refactoring suggestions depending on the current context. Press - Ctrl-1 (or Cmd-1 on - Mac) in an editor, and Eclipse provides a list of possible refactorings depending on the - context. The Quick Assistant provides fast access to all of the above refactorings, where applicable. - For example, if you are editing an XML value and decide you want to extract it out - as a string, place the text cursor in the string and press Ctrl-1 to see the refactoring context - menu.
-
- - - - - -

Updating the ADT Plugin

- -

From time to time, a new revision of the ADT Plugin becomes available, with -new features and bug fixes. Generally, when a new revision of ADT is available, -you should update to it as soon as convenient.

- -

In some cases, a new revision of ADT will have a dependency on a specific -revision of the Android SDK Tools. If such dependencies exist, you will need to -update the SDK Tools package of the SDK after installing the new revision of -ADT. To update the SDK Tools package, use the Android SDK Manager, as -described in Adding SDK Packages.

- -

To learn about new features of each ADT revision and also any dependencies on -the SDK Tools, see the listings in the Revisions -section. To determine the version currently installed, open the -Eclipse Installed Software window using Help -> Software Updates and refer to the version listed for -"Android Development Tools".

- -

Follow the steps below to check whether an update is available and, if so, -to install it.

- -
    -
  1. Select Help > Check for Updates. -

    If there are no updates available, a dialog will say so and you're done.

  2. -
  3. If there are updates available, select Android DDMS, Android Development Tools, - and Android Hierarchy Viewer, then click Next.
  4. -
  5. In the Update Details dialog, click Next.
  6. -
  7. Read and accept the license agreement and then click Finish. - This will download and install the latest version of Android DDMS and - Android Development Tools.
  8. -
  9. Restart Eclipse.
  10. -
- - -

If you encounter problems during the update, remove the existing ADT plugin from Eclipse, then -perform a fresh installation, using the instructions for Installing the ADT -Plugin.

diff --git a/docs/html/tools/projects/projects-eclipse.jd b/docs/html/tools/projects/projects-eclipse.jd deleted file mode 100644 index af8501572f648..0000000000000 --- a/docs/html/tools/projects/projects-eclipse.jd +++ /dev/null @@ -1,273 +0,0 @@ -page.title=Managing Projects from Eclipse with ADT -parent.title=Managing Projects -parent.link=index.html -@jd:body - -
-
-

In this document

- -
    -
  1. Creating an Android Project
  2. - -
  3. Setting up a Library Project
  4. - -
  5. Referencing a Library Project
  6. -
- -

See also

- -
    -
  1. Testing - from Eclipse with ADT
  2. -
-
-
- -

Eclipse and the ADT plugin provide GUIs and wizards to create all three types of projects - (Android project, Library project, and Test project): - -

- -

Creating an Android Project

- -

The ADT plugin provides a New Project Wizard that you can use to quickly create a new - Android project (or a project from existing code). To create a new project:

- -
    -
  1. Select File > New > Project.
  2. - -
  3. Select Android > Android Application Project, and click - Next.
  4. - -
  5. Enter the basic settings for the project: - - -
  6. - -
  7. In the Configure Project page, select the desired settings and click - Next. Leave the Create activity option checked so you can - start your application with some essential components.
  8. - -
  9. In the Configure Launcher Icon page, create an icon and click - Next.
  10. - -
  11. In the Create Activity page, select activity template and click - Next. For more information about Android code templates, see - Using Code Templates. -
  12. - -
  13. Click Finish and the wizard creates a new project according to the options - you have chosen.
  14. -
- -

Tip: You can also start the New Project Wizard by clicking the - New icon in the toolbar.

- - -

Setting up a Library Project

- -

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.

- -

To create a new library project:

- -
    -
  1. Select File > New > Project.
  2. - -
  3. Select Android > Android Application Project, and click - Next.
  4. - -
  5. Enter the basic settings for the project, including Application Name, - Project Name, Package Name, and SDK settings.
  6. - -
  7. In the Configure Project page, select the Mark this project as a - library option to flag the project as a library.
  8. - -
  9. Set the other options as desired and click Next.
  10. - -
  11. Follow the instructions to complete the wizard and create a new library project.
  12. -
- -

You can also convert an existing application project into a library. To do so, simply open the - Properties for the project and select the is Library checkbox, as shown in - the figure below.

- - -

Figure 1. Marking a project as an Android library.

- -

To set the a project's properties to indicate that it is a library project:

- -
    -
  1. In the Package Explorer, right-click the library project and select - Properties.
  2. - -
  3. In the Properties window, select the Android properties - group in the left pane and locate the Library properties in the right pane.
  4. - -
  5. Select the is Library check box and click Apply.
  6. - -
  7. Click OK to close the Properties window.
  8. -
- -

Once you create a library project or mark an existing project as a library, you can reference - the library project in other Android application projects. For more information, see the - Referencing a library project section. - - -

Creating the manifest 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 - AndroidManifest.xml.

- -

For example, the TicTacToeLib example library - project declares the activity GameActivity:

-
-<manifest>
-  ...
-  <application>
-    ...
-    <activity android:name="GameActivity" />
-    ...
-  </application>
-</manifest>
-
- -

Referencing a library project

- -

If you are developing an application and want to include the shared code or resources from a - library project, you can do so easily by adding a reference to the library project in the - application project's Properties.

- -

To add a reference to a library project, follow these steps:

- -
    -
  1. Make sure that both the project library and the application project that depends on it are - in your workspace. If one of the projects is missing, import it into your workspace.
  2. - -
  3. In the Package Explorer, right-click the dependent project and select - Properties.
  4. - -
  5. In the Properties window, select the "Android" properties group at left - and locate the Library properties at right.
  6. - -
  7. Click Add to open the Project Selection dialog.
  8. - -
  9. From the list of available library projects, select a project and click - OK.
  10. - -
  11. When the dialog closes, click Apply in the Properties - window.
  12. - -
  13. Click OK to close the Properties window.
  14. -
- -

As soon as the Properties dialog closes, Eclipse rebuilds the project, including the contents - of the library project.

- -

Figure 2 shows the Properties dialog that lets you add library references and move - them up and down in priority.

- -

Figure 2. Adding a reference to a - library project in the properties of an application project.

- -

If you are adding references to multiple libraries, note that you can set their relative - priority (and merge order) by selecting a library and using the Up and - Down controls. The tools merge the referenced libraries with your application - starting from lowest priority (bottom of the list) to highest (top of the list). If more than one - library defines the same resource ID, the tools select the resource from the library with higher - priority. The application itself has highest priority and its resources are always used in - preference to identical resource IDs defined in libraries.

- -

Declaring library components in the manifest file

- -

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 - declare any <activity>, <service>, - <receiver>, <provider>, and so on, as well as - <permission>, <uses-library>, and similar elements.

- -

Declarations should reference the library components by their fully-qualified package names, - where appropriate.

- -

For example, the TicTacToeMain example - application declares the library activity GameActivity like this:

-
-<manifest>
-  ...
-  <application>
-    ...
-    <activity android:name="com.example.android.tictactoe.library.GameActivity" />
-    ...
-  </application>
-</manifest>
-
- -

For more information about the manifest file, see the documentation for AndroidManifest.xml.

- - - - - - - diff --git a/docs/html/tools/publishing/app-signing-eclipse.jd b/docs/html/tools/publishing/app-signing-eclipse.jd deleted file mode 100644 index 738e488683196..0000000000000 --- a/docs/html/tools/publishing/app-signing-eclipse.jd +++ /dev/null @@ -1,64 +0,0 @@ -page.title=Signing Your Applications from Eclipse with ADT -@jd:body - -
-
- -

In this document

- -
    -
  1. Signing Your App for Release
  2. -
- -

See also

- -
    -
  1. Signing Your Applications
  2. -
- -
-
- - -

Android requires that all apps be digitally signed with a certificate before they can be -installed. Android uses this certificate to identify the author of an app, and the certificate -does not need to be signed by a certificate authority.

- -

This document provides detailed instructions about how to sign your apps in release mode with the -ADT plugin for Eclipse. For information about how to obtain a certificate for signing your app, see -Signing Your Applications. -

- - -

Signing Your App for Release

- -

To sign your app for release with ADT, follow these steps:

- -
    -
  1. Select the project in the Package Explorer and select File > -Export.
  2. -
  3. On the Export window, select Export Android Application and click -Next.
  4. -
  5. On the Export Android Application window, select the project you want to sign and -click Next.
  6. -
  7. -

    On the next window, enter the location to create a keystore and a keystore password. If you -already have a keystore, select Use existing keystore, enter your keystore's -location and password, and go to step 6.

    - -

    Figure 6. Select a keystore in ADT.

    -
  8. -
  9. On the next window, provide the required information as shown in figure 5.

    -

    Your key should be valid for at least 25 years, so you can sign app updates with the same key -through the lifespan of your app.

    - -

    Figure 7. Create a private key in ADT.

    -
  10. -
  11. On the next window, select the location to export the signed APK.

    - -

    Figure 8. Export the signed APK in ADT.

    -
  12. -
diff --git a/docs/html/tools/testing/testing_eclipse.jd b/docs/html/tools/testing/testing_eclipse.jd deleted file mode 100644 index 6c9d55b64a83e..0000000000000 --- a/docs/html/tools/testing/testing_eclipse.jd +++ /dev/null @@ -1,535 +0,0 @@ -page.title=Testing from Eclipse with ADT -parent.title=Testing -parent.link=index.html -@jd:body -
-
-

In this document

-
    -
  1. Creating a Test Project
  2. -
  3. Creating a Test Package
  4. -
  5. Running Tests
  6. -
-
-
-

- This topic explains how create and run tests of Android applications in Eclipse with ADT. - Before you read this topic, you should read about how to create an Android application with the - basic processes for creating and running applications with ADT, as described in - Managing Projects from -Eclipse - and Building and Running -from Eclipse. - You may also want to read - Testing Fundamentals, - which provides an overview of the Android testing framework. -

-

- ADT provides several features that help you set up and manage your testing environment - effectively: -

- -

- If you are not developing in Eclipse or you want to learn how to create and run tests from the - command line, see - Testing from Other IDEs. -

-

Creating a Test Project

-

- To set up a test environment for your Android application, you must first create a separate - project that holds the test code. The new project follows the directory structure - used for any Android application. It includes the same types of content and files, such as - source code, resources, a manifest file, and so forth. The test package you - create is connected to the application under test by an - - <instrumentation> element in its manifest file. -

-

- The New Android Test Project dialog makes it easy for you to generate a - new test project that has the proper structure, including the - <instrumentation> element in the manifest file. You can use the New - Android Test Project dialog to generate the test project at any time. The dialog appears - just after you create a new Android main application project, but you can also run it to - create a test project for a project that you created previously. -

-

- To create a test project in Eclipse with ADT: -

-
    -
  1. - In Eclipse, select File > New > Other. This opens the Select a - Wizard dialog. -
  2. -
  3. - In the dialog, in the Wizards drop-down list, find the entry for Android, then - click the toggle to the left. Select Android Test Project, then at the - bottom of the dialog click Next. The New Android Test Project - wizard appears. -
  4. -
  5. - Next to Test Project Name, enter a name for the project. You may use any name, - but you may want to associate the name with the project name for the application under test. - One way to do this is to take the application's project name, append the string "Test" to - it, and then use this as the test package project name. -

    - The name becomes part of the suggested project path, but you can change this in the - next step. -

    -
  6. -
  7. - In the Content panel, examine the suggested path to the project. - If Use default location is set, then the wizard will suggest a path that is - a concatenation of the workspace path and the project name you entered. For example, - if your workspace path is /usr/local/workspace and your project name is - MyTestApp, then the wizard will suggest - /usr/local/workspace/MyTestApp. To enter your own - choice for a path, unselect Use default location, then enter or browse to the - path where you want your project. -

    - To learn more about choosing the location of test projects, please read - - Testing Fundamentals. -

    -
  8. -
  9. - In the Test Target panel, set An Existing Android Project, click Browse, then select your - Android application from the list. You now see that the wizard has completed the Test - Target Package, Application Name, and Package Name fields for you (the latter two are in - the Properties panel). -
  10. -
  11. - In the Build Target panel, select the Android SDK platform that the application under test - uses. -
  12. -
  13. - Click Finish to complete the wizard. If Finish is disabled, look for error messages at the - top of the wizard dialog, and then fix any problems. -
  14. -
-

Creating a Test Package

-

- Once you have created a test project, you populate it with a test package. This package does not - require an Activity, although you can define one if you wish. Although your test package can - combine Activity classes, test case classes, or ordinary classes, your main test case - should extend one of the Android test case classes or JUnit classes, because these provide the - best testing features. -

-

- Test packages do not need to have an Android GUI. When you run the package in - Eclipse with ADT, its results appear in the JUnit view. Running tests and seeing the results is - described in more detail in the section Running Tests. -

- -

- To create a test package, start with one of Android's test case classes defined in - {@link android.test android.test}. These extend the JUnit - {@link junit.framework.TestCase TestCase} class. The Android test classes for Activity objects - also provide instrumentation for testing an Activity. To learn more about test case - classes, please read the topic - Testing Fundamentals. -

-

- Before you create your test package, you choose the Java package identifier you want to use - for your test case classes and the Android package name you want to use. To learn more - about this, please read - - Testing Fundamentals. -

-

- To add a test case class to your project: -

-
    -
  1. - In the Project Explorer tab, open your test project, then open the src - folder. -
  2. -
  3. - Find the Java package identifier set by the projection creation wizard. If you haven't - added classes yet, this node won't have any children, and its icon will not be filled in. - If you want to change the identifier value, right-click the identifier and select - Refactor > Rename, then enter the new name. -
  4. -
  5. - When you are ready, right-click the Java package identifier again and select - New > Class. This displays the New Java Class - dialog, with the Source folder and Package values already set. -
  6. -
  7. - In the Name field, enter a name for the test case class. One way to choose a - class name is to append the string "Test" to the class of the component you are testing. - For example, if you are testing the class MyAppActivity, your test case class - name would be MyAppActivityTest. Leave the modifiers set to public. -
  8. -
  9. - In the Superclass field, enter the name of the Android test case class you - are extending. You can also browse the available classes. -
  10. -
  11. - In Which method stubs would you like to create?, unset all the options, then - click Finish. You will set up the constructor manually. -
  12. -
  13. - Your new class appears in a new Java editor pane. -
  14. -
-

- You now have to ensure that the constructor is set up correctly. Create a constructor for your - class that has no arguments; this is required by JUnit. As the first statement in this - constructor, add a call to the base class' constructor. Each base test case class has its - own constructor signature. Refer to the class documentation in the documentation for - {@link android.test} for more information. -

-

- To control your test environment, you will want to override the setUp() and - tearDown() methods: -

- -

- Another useful convention is to add the method testPreconditions() to your test - class. Use this method to test that the application under test is initialized correctly. If this - test fails, you know that the initial conditions were in error. When this happens, further - test results are suspect, regardless of whether or not the tests succeeded. -

-

- The Resources tab contains an - Activity Testing - tutorial with more information about creating test classes and methods. -

-

Running Tests

- -

- When you run a test package in Eclipse with ADT, the output appears in the Eclipse JUnit view. - You can run the entire test package or one test case class. To do run tests, Eclipse runs the - adb command for running a test package, and displays the output, so there is no - difference between running tests inside Eclipse and running them from the command line. -

-

- As with any other package, to run a test package in Eclipse with ADT you must either attach a - device to your computer or use the Android emulator. If you use the emulator, you must have an - Android Virtual Device (AVD) that uses the same target as the test package. -

-

- To run a test in Eclipse, you have two choices:

- -

- To create and run a test suite using a run configuration: -

-
    -
  1. - In the Package Explorer, select the test project, then from the main menu, select - Run > Run Configurations.... The Run Configurations dialog appears. -
  2. -
  3. - In the left-hand pane, find the Android JUnit Test entry. In the right-hand pane, click the - Test tab. The Name: text box shows the name of your project. The Test class: dropdown box - shows one of the test classes in your project. -
  4. -
  5. - To run one test class, click Run a single test, then enter your project name in the - Project: text box and the class name in the Test class: text box. -

    - To run all the test classes, click Run all tests in the selected project or package, - then enter the project or package name in the text box. -

    -
  6. -
  7. - Now click the Target tab. - -
  8. -
  9. - Click the Common tab. In the Save As pane, click Local to save this run configuration - locally, or click Shared to save it to another project. -
  10. -
  11. - Optional: Add the configuration to the Run toolbar and the Favorites - menu: in the Display in Favorites pane click the checkbox next to Run. -
  12. -
  13. - Optional: To add this configuration to the Debug menu and toolbar, click - the checkbox next to Debug. -
  14. -
  15. - To save your settings, click Close.
    -

    Note: - Although you can run the test immediately by clicking Run, you should save the test - first and then run it by selecting it from the Eclipse standard toolbar. -

    -
  16. -
  17. - On the Eclipse standard toolbar, click the down arrow next to the green Run arrow. This - displays a menu of saved Run and Debug configurations. -
  18. -
  19. - Select the test run configuration you just created. The test starts. -
  20. -
-

- The progress of your test appears in the Console view as a series of messages. Each message is - preceded by a timestamp and the .apk filename to which it applies. For example, - this message appears when you run a test to the emulator, and the emulator is not yet started: -

- -
-    [yyyy-mm-dd hh:mm:ss - testfile] Waiting for HOME ('android.process.acore') to be launched...
-
-

- In the following description of these messages, devicename is the name of - the device or emulator you are using to run the test, and port is the - port number for the device. The name and port number are in the format used by the - adb devices - command. Also, testfile is the .apk filename of the test - package you are running, and appfile is the filename of the application under test. -

- -

- The following lines are an example of this message sequence: -

- -[2010-07-01 12:44:40 - MyTest] HOME is up on device 'emulator-5554'
-[2010-07-01 12:44:40 - MyTest] Uploading MyTest.apk onto device 'emulator-5554'
-[2010-07-01 12:44:40 - MyTest] Installing MyTest.apk...
-[2010-07-01 12:44:49 - MyTest] Success!
-
-
- -

- The following lines are an example of this message sequence: -

- -[2010-07-01 12:44:49 - MyTest] Project dependency found, installing: MyApp
-[2010-07-01 12:44:49 - MyApp] Uploading MyApp.apk onto device 'emulator-5554'
-[2010-07-01 12:44:49 - MyApp] Installing MyApp.apk...
-[2010-07-01 12:44:54 - MyApp] Success!
-
-
- -

- The following lines are an example of this message sequence: -

- -[2010-01-01 12:45:02 - MyTest] Launching instrumentation android.test.InstrumentationTestRunner on device emulator-5554
-[2010-01-01 12:45:02 - MyTest] Collecting test information
-[2010-01-01 12:45:02 - MyTest] Sending test information to Eclipse
-[2010-01-01 12:45:02 - MyTest] Running tests...
-[2010-01-01 12:45:22 - MyTest] Test run complete
-
-
-

- The test results appear in the JUnit view. This is divided into an upper summary pane, - and a lower stack trace pane. -

-

- The upper pane contains test information. In the pane's header, you see the following - information: -

- -

- The body of the upper pane contains the details of the test run. For each test case class - that was run, you see a line with the class name. To look at the results for the individual - test methods in that class, you click the left arrow to expand the line. You now see a - line for each test method in the class, and to its right the time it took to run. - If you double-click the method name, Eclipse opens the test class source in an editor view - pane and moves the focus to the first line of the test method. -

-

- The results of a successful test are shown in figure 1. -

- - Messages for a successful test - -

- Figure 1. Messages for a successful test. -

-

- The lower pane is for stack traces. If you highlight a failed test in the upper pane, the - lower pane contains a stack trace for the test. If a line corresponds to a point in your - test code, you can double-click it to display the code in an editor view pane, with the - line highlighted. For a successful test, the lower pane is empty. -

-

The results of a failed test are shown in figure 2.

- - - -

- Figure 2. Messages for a test failure. -

diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs index d8275b578a013..12aecd98f5172 100644 --- a/docs/html/tools/tools_toc.cs +++ b/docs/html/tools/tools_toc.cs @@ -17,7 +17,7 @@ @@ -39,7 +48,9 @@ -