docs: Android Eclipse ADT update and removals - Batch 03

b/25192800

Change-Id: I2ec275ba81449db5d695483e0adee70e4eb579f3
This commit is contained in:
Joe Fernandez
2015-12-14 16:30:41 -08:00
parent 80e75667cc
commit a7a294cfcb
15 changed files with 120 additions and 227 deletions

12
docs/html/about/versions/android-4.0-highlights.jd Normal file → Executable file
View File

@@ -143,7 +143,7 @@ content from the home screen.</div>
favorites tray</strong></p>
<p>New home screen <strong>folders</strong> offer a new way for users to group
their apps and shortcuts logically, just by dragging one onto another. Also,
their apps and shortcuts logically, just by dragging one onto another. Also,
in All Apps launcher, users can now simply <strong>drag an app</strong> to get
information about it or immediately uninstall it, or disable a pre-installed app.</p>
@@ -210,7 +210,7 @@ engine lets you dictate continously.</div>
<p style="margin-top:1em;margin-bottom:.75em;"><strong>Improved text input and
spell-checking</strong></p>
<p>The soft keyboard in Android 4.0 makes text input even faster and more
accurate. Error correction and word suggestion are improved through a new set of
default dictionaries and more accurate heuristics for handling cases such as
@@ -693,7 +693,7 @@ development across the range of Android-powered devices.</p>
<h3 id="communication-dev">Communication and sharing</h3>
<p>Android 4.0 extends social and sharing features to any application on the
device. Applications can integrate contacts, profile data, stream items,
device. Applications can integrate contacts, profile data, stream items,
and calendar events from any of the user’s activities or social networks.</p>
@@ -914,8 +914,8 @@ supporting flatter view hierarchies that are faster to layout and render.
Because hierarchies are flatter, developers can also manage alignments between
components that are visually related to each other even when they are not
logically related, for precise control over application UI. GridLayout is also
specifically designed to be configured by drag-and-drop design tools such as the
ADT Plug-in for Eclipse.</p>
specifically designed to be configured by drag-and-drop design tools such as
Android Studio.</p>
<p style="margin-top:1em;margin-bottom:.75em;"><strong>OpenGL ES texture
@@ -998,7 +998,7 @@ properties such as parent and child nodes, available states, supported actions,
screen position, and more. Applications can also request changes to certain
properties to help manage focus and selected state. For example, an
accessibility service could use these new capabilities to add convenient
features such as screen-search by text. </p>
features such as screen-search by text. </p>
<p style="margin-top:1em;margin-bottom:.75em;"><strong>Text-to-speech

43
docs/html/google/play/expansion-files.jd Normal file → Executable file
View File

@@ -450,37 +450,36 @@ receives updates about the download progress.</li>
download two packages from the SDK Manager and add the appropriate libraries to your
application.</p>
<p>First, open the <a href="{@docRoot}sdk/exploring.html">Android SDK Manager</a>, expand
<em>Extras</em> and download:</p>
<p>First, open the <a href="{@docRoot}sdk/exploring.html">Android SDK Manager</a>
(<strong>Tools > Android > SDK Manager</strong>), and under
<em>Appearance & Behavior > System Settings > Android SDK</em>, select
the <em>SDK Tools</em> tab to select and download:</p>
<ul>
<li><em>Google Play Licensing Library package</em></li>
<li><em>Google Play APK Expansion Library package</em></li>
</ul>
<p>If you're using Eclipse, create a project for each library and add it to your app:</p>
<p>Create a new library module for the License Verification Library and Downloader
Library. For each library:</p>
<ol>
<li>Create a new Library Project for the License Verification Library and Downloader
Library. For each library:
<ol>
<li>Begin a new Android project.</li>
<li>Select <strong>Create project from existing
source</strong> and choose the library from the {@code &lt;sdk&gt;/extras/google/} directory
({@code market_licensing/} for the License Verification Library or {@code
market_apk_expansion/downloader_library/} for the Downloader Library).</li>
<li>Specify a <em>Project Name</em> such as "Google Play License Library" and "Google Play
Downloader
Library"</li>
<li>Click <strong>Finish</strong>.</li>
</ol>
<li>Select <strong>File > New > New Module</strong>.</li>
<li>In the <em>Create New Module</em> window, select <strong>Android Library</strong>,
and then select <strong>Next</strong>.</li>
<li>Specify an <em>Application/Library name</em> such as "Google Play License Library"
and "Google Play Downloader Library", choose <em>Minimum SDK level</em>, then select
<strong>Finish</strong>.</li>
<li>Select <strong>File > Project Structure</strong>.</li>
<li>Select the <em>Properties</em> tab and in <em>Library
Repository</em>, enter the library from the {@code &lt;sdk&gt;/extras/google/} directory
({@code play_licensing/} for the License Verification Library or {@code
play_apk_expansion/downloader_library/} for the Downloader Library).</li>
<li>Select <strong>OK</strong> to create the new module.</li>
</ol>
<p class="note"><strong>Note:</strong> The Downloader Library depends on the License
Verification Library. Be sure to add the License
Verification Library to the Downloader Library's project properties (same process as
steps 2 and 3 below).</p>
Verification Library to the Downloader Library's project properties.</p>
</li>
<li>Right-click the Android project in which you want to use APK expansion files and
select <strong>Properties</strong>.</li>
<li>In the <em>Library</em> panel, click <strong>Add</strong> to select and add each of the
libraries to your application.</li>
</ol>
<p>Or, from a command line, update your project to include the libraries:</p>

30
docs/html/guide/practices/app-design/seamlessness.jd Normal file → Executable file
View File

@@ -41,10 +41,10 @@ display the dialog in front of whatever the user was doing (such as dialing a
phone call, for example). That behavior would not work for your application or
for the user. </p>
<p>To avoid these problems, your application should use the proper system
facility for notifying the user &mdash; the
<p>To avoid these problems, your application should use the proper system
facility for notifying the user &mdash; the
{@link android.app.Notification Notification} classes. Using
notifications, your application can signal the user that an event has
notifications, your application can signal the user that an event has
taken place, by displaying an icon in the status bar rather than taking
focus and interrupting the user.</p>
@@ -140,7 +140,7 @@ the application is hung and offers to kill it for the user.</p>
on the event handler thread, effectively blocking the event handler. This will
delay input processing, and result in the ANR dialogs. To avoid this, move
your computations to a thread. This <a
href="responsiveness.html">Design for Responsiveness</a> document
href="responsiveness.html">Design for Responsiveness</a> document
discusses how to do that..</p>
<h2 id="multiple-activities">Don't Overload a Single Activity Screen</h2>
@@ -175,16 +175,16 @@ the details, read <a href="{@docRoot}guide/topics/ui/themes.html">Styles and The
<h2 id="flexui">Design Your UI to Work with Multiple Screen Resolutions</h2>
<p>Different Android-powered devices will support different screen resolutions.
Some will even be able to change resolutions on the fly, such as by switching
to landscape mode. It's important to make sure your layouts and drawables
<p>Different Android-powered devices will support different screen resolutions.
Some will even be able to change resolutions on the fly, such as by switching
to landscape mode. It's important to make sure your layouts and drawables
are flexible enough to display properly on a variety of device screens.</p>
<p>Fortunately, this is very easy to do. In brief, what you must do is
provide different versions of your artwork (if you use any) for the key
resolutions, and then design your layout to accommodate various dimensions.
(For example, avoid using hard-coded positions and instead use relative
layouts.) If you do that much, the system handles the rest, and your
<p>Fortunately, this is very easy to do. In brief, what you must do is
provide different versions of your artwork (if you use any) for the key
resolutions, and then design your layout to accommodate various dimensions.
(For example, avoid using hard-coded positions and instead use relative
layouts.) If you do that much, the system handles the rest, and your
application looks great on any device.</p>
<h2 id="network">Assume the Network is Slow</h2>
@@ -208,9 +208,9 @@ likely to be unpopular.</p>
you're using the emulator, since the emulator uses your desktop computer's
network connection. That's almost guaranteed to be much faster than a cell
network, so you'll want to change the settings on the emulator that simulate
slower network speeds. You can do this in Eclipse, in the "Emulator Settings"
tab of your launch configuration or via a <a
href="{@docRoot}tools/help/emulator.html#netspeed">command-line
slower network speeds. You can do this in Android Studio via the AVD Manager or
via a <a
href="{@docRoot}tools/help/emulator.html#netspeed">command-line
option</a> when starting the emulator.</p>
<h2 id="keyboard">Don't Assume Touchscreen or Keyboard</h2>

View File

@@ -42,10 +42,10 @@ display the dialog in front of whatever the user was doing (such as dialing a
phone call, for example). That behavior would not work for your application or
for the user. </p>
<p>To avoid these problems, your application should use the proper system
facility for notifying the user &mdash; the
<p>To avoid these problems, your application should use the proper system
facility for notifying the user &mdash; the
{@link android.app.Notification Notification} classes. Using
notifications, your application can signal the user that an event has
notifications, your application can signal the user that an event has
taken place, by displaying an icon in the status bar rather than taking
focus and interrupting the user.</p>
@@ -141,7 +141,7 @@ the application is hung and offers to kill it for the user.</p>
on the event handler thread, effectively blocking the event handler. This will
delay input processing, and result in the ANR dialogs. To avoid this, move
your computations to a thread. This <a
href="responsiveness.html">Design for Responsiveness</a> document
href="responsiveness.html">Design for Responsiveness</a> document
discusses how to do that..</p>
<h2 id="multiple-activities">Don't Overload a Single Activity Screen</h2>
@@ -176,16 +176,16 @@ the details, read <a href="{@docRoot}guide/topics/ui/themes.html">Styles and The
<h2 id="flexui">Design Your UI to Work with Multiple Screen Resolutions</h2>
<p>Different Android-powered devices will support different screen resolutions.
Some will even be able to change resolutions on the fly, such as by switching
to landscape mode. It's important to make sure your layouts and drawables
<p>Different Android-powered devices will support different screen resolutions.
Some will even be able to change resolutions on the fly, such as by switching
to landscape mode. It's important to make sure your layouts and drawables
are flexible enough to display properly on a variety of device screens.</p>
<p>Fortunately, this is very easy to do. In brief, what you must do is
provide different versions of your artwork (if you use any) for the key
resolutions, and then design your layout to accommodate various dimensions.
(For example, avoid using hard-coded positions and instead use relative
layouts.) If you do that much, the system handles the rest, and your
<p>Fortunately, this is very easy to do. In brief, what you must do is
provide different versions of your artwork (if you use any) for the key
resolutions, and then design your layout to accommodate various dimensions.
(For example, avoid using hard-coded positions and instead use relative
layouts.) If you do that much, the system handles the rest, and your
application looks great on any device.</p>
<h2 id="network">Assume the Network is Slow</h2>
@@ -209,9 +209,9 @@ likely to be unpopular.</p>
you're using the emulator, since the emulator uses your desktop computer's
network connection. That's almost guaranteed to be much faster than a cell
network, so you'll want to change the settings on the emulator that simulate
slower network speeds. You can do this in Android Studio via the AVD Manager,
slower network speeds. You can do this in Android Studio via the AVD Manager,
or via a <a
href="{@docRoot}tools/help/emulator.html#netspeed">command-line
href="{@docRoot}tools/help/emulator.html#netspeed">command-line
option</a> when starting the emulator.</p>
<h2 id="keyboard">Don't Assume Touchscreen or Keyboard</h2>

5
docs/html/guide/topics/graphics/prop-animation.jd Normal file → Executable file
View File

@@ -920,10 +920,7 @@ in multiple activities and more easily edit the animation sequence.</p>
<p>To distinguish animation files that use the new property animation APIs from those that use the
legacy <a href="{@docRoot}guide/topics/graphics/view-animation.html">view animation</a> framework,
starting with Android 3.1, you should save the XML files for property animations in the {@code
res/animator/} directory (instead of {@code res/anim/}). Using the {@code animator} directory name
is optional, but necessary if you want to use the layout editor tools in the Eclipse ADT plugin (ADT
11.0.0+), because ADT only searches the {@code res/animator/} directory for property animation
resources.</p>
res/animator/} directory.</p>
<p>The following property animation classes have XML declaration support with the
following XML tags:</p>

17
docs/html/guide/topics/location/strategies.jd Normal file → Executable file
View File

@@ -402,20 +402,23 @@ dynamic set of data is updated each time the user location updates.</p>
user location works. This is most easily done using a real Android-powered device. If, however, you
don't have a device, you can still test your location-based features by mocking location data in
the Android emulator. There are three different ways to send your application mock location
data: using Eclipse, DDMS, or the "geo" command in the emulator console.</p>
data: using Android Studio, DDMS, or the "geo" command in the emulator console.</p>
<p class="note"><strong>Note:</strong> Providing mock location data is injected as GPS location
data, so you must request location updates from <code>GPS_PROVIDER</code> in order for mock location
data to work.</p>
<h3 id="MockEclipse">Using Eclipse</h3>
<h3 id="MockAVD">Using Android Studio</h3>
<p>Select <b>Window</b> &gt; <b>Show View</b> &gt; <b>Other</b> &gt; <b>Emulator Control</b>.</p>
<p>Select <b>Tools</b> &gt; <b>Android</b> &gt; <b>AVD Manager</b>. In the Android Virtual
Device Manager window, choose your AVD and launch it in the emulator by selecting the green
play arrow in the Actions column.</p>
<p>In the Emulator Control panel, enter GPS coordinates under Location Controls as individual
lat/long coordinates, with a GPX file for route playback, or a KML file for multiple place marks.
(Be sure that you have a device selected in the Devices panel&mdash;available from <b>Window</b>
&gt; <b>Show View</b> &gt; <b>Other</b> &gt; <b>Devices</b>.)</p>
<p>Then, select <b>Tools</b> &gt; <b>Android</b> &gt; <b>Android Device Monitor</b>.
Select the Emulator Control tab in the Android Device Monitor window, and enter GPS coordinates
under Location Controls as individual lat/long coordinates, with a GPX file for route playback,
or a KML file for multiple place marks.
</p>
<h3 id="MockDdms">Using DDMS</h3>

39
docs/html/guide/topics/renderscript/compute.jd Normal file → Executable file
View File

@@ -192,7 +192,6 @@ precision (such as SIMD CPU instructions).</p>
<li>Make sure you have the required Android SDK version and Build Tools version installed.</li>
<li> Update the settings for the Android build process to include the RenderScript settings:
<p><strong>For Android Studio or Gradle-based builds</strong></p>
<ul>
<li>Open the {@code build.gradle} file in the app folder of your application module. </li>
<li>Add the following RenderScript settings to the file:
@@ -233,42 +232,8 @@ android {
installed build tools version is used. You should always set this value to ensure the
consistency of builds across development machines with different configurations.</li>
</ul>
</li>
<p><strong>For Eclipse</strong></p>
<ul>
<li>Open the {@code project.properties} file in the root folder of your application project.</li>
<li>Add the following lines to the file:
<pre>
renderscript.target=18
renderscript.support.mode=true
sdk.buildtools=18.1.0
</pre>
<p>The settings listed above control specific behavior in the Android build process:</p>
<ul>
<li>{@code renderscript.target} - Specifies the bytecode version to be generated. We
recommend you set this value to the highest available API level and set
{@code renderscript.support.mode} to {@code true}. Valid values for this setting are any
integer value from 11 to the most recently released API level. If your minimum SDK version
specified in your application manifest is set to a higher value, this value is ignored and
the target value is set to the minimum SDK version.</li>
<li>{@code renderscript.support.mode} - Specifies that the generated bytecode should fall
back to a compatible version if the device it is running on does not support the target version.
</li>
<li>{@code sdk.buildtools} - The version of the Android SDK build tools to use. This value
should be set to {@code 18.1.0} or higher. If this option is not specified, the highest
installed build tools version is used. You should always set this value to ensure the
consistency of builds across development machines with different configurations.</li>
</ul>
</li>
</ul>
</ul>
</ul>
<li>In your application classes that use RenderScript, add an import for the Support Library
classes:
@@ -279,7 +244,7 @@ import android.support.v8.renderscript.*;
</li>
</0l>
</ol>
<h2 id="using-rs-from-java">Using RenderScript from Java Code</h2>

42
docs/html/tools/adk/adk.jd Normal file → Executable file
View File

@@ -299,46 +299,8 @@ href="http://arduino.cc/en/Main/ArduinoBoardADK">Arduino Mega ADK</a> (for EU na
ADK board. The ADK board receives commands such as lighting up the board's LEDs or sends data
from the board such as joystick movement and temperature readings.</p>
<p>To install and run the application in Eclipse:</p>
<ol>
<li><a href="http://code.google.com/android/add-ons/google-apis/installing.html">Install the
Google APIs API Level 10 add-on library</a>, which includes the Open Accessory library for
2.3.4 devices that support accessory mode. This library is also forward compatible with Android
3.1 or newer devices that support accessory mode. If you only care about Android 3.1 or newer
devices, all you need is API Level 12. For more information on deciding which API level to use,
see the <a href="{@docRoot}guide/topics/connectivity/usb/accessory.html#choosing">USB Accessory</a>
documentation.</li>
<li>Click <strong>File &gt; New &gt; Project...</strong>, then select <strong>Android &gt;
Android Project</strong></li>
<li>In the <strong>Project name:</strong> field, type DemoKit.</li>
<li>Choose <strong>Create project from existing source</strong>, click <strong>Browse</strong>,
select the <code>app</code> directory, click <strong>Open</strong> to close that dialog and then
click <strong>Finish</strong>.</li>
<li>For Build Target, select <strong>Google APIs</strong> (Platform 2.3.3, API Level 10).
<p class="note"><strong>Note:</strong> Even though the add-on is labeled as
<strong>2.3.3</strong>, the newest Google API add-on library for API level 10 adds USB Open
Accessory API support for 2.3.4 devices.</p>
</li>
<li>Click <strong>Finish</strong>.</li>
<li>Install the application to your device.</li>
<li>Connect the ADK board (USB-A) to your Android-powered device (micro-USB). Ensure that the
power cable to the accessory is plugged in or that the micro-USB port on the accessory is
connected to your computer for power (this also allows you to <a href="#monitoring">monitor the
ADK board</a>). When connected, accept the prompt that asks for whether or not to open the
DemoKit application to connect to the accessory. If the prompt does not show up, connect and
reconnect the accessory.</li>
</ol>
<p>You can now interact with the ADK board by moving the color LED or servo sliders (make sure
<p>After the application is installed, you can interact with the ADK board by moving the color
LED or servo sliders (make sure
the servos are connected) or by pressing the relay buttons in the application. On the ADK shield,
you can press the buttons and move the joystick to see their outputs displayed in the
application.</p>

21
docs/html/tools/support-library/features.jd Normal file → Executable file
View File

@@ -38,7 +38,7 @@ page.title=Support Library Features
Support Library Revisions</a></li>
<li><a href="{@docRoot}tools/support-library/setup.html">
Support Library Setup</a></li>
<li><a href="{@docRoot}tools/testing-support-library/index.html">
<li><a href="{@docRoot}tools/testing-support-library/index.html">
Testing Support Library</a></li>
</ol>
@@ -55,7 +55,7 @@ page.title=Support Library Features
appcompat</a> libraries, because they support a wide range of
Android versions and provide APIs for recommended user interface patterns.</p>
<p>To use any of the following libraries, you must download the library files to your
<p>In order to use any of the following libraries, you must download the library files to your
Android SDK installation. Follow the directions for downloading the Support Libraries in
<a href="{@docRoot}tools/support-library/setup.html#download">Support Library Setup</a> to
complete this step. You must take additional steps to include a specific Support Library in
@@ -204,8 +204,7 @@ com.android.support:multidex:1.0.0
</p>
<p class="note"><strong>Note:</strong>
This library depends on the v4 Support Library. If you are using Ant or Eclipse, make sure
you include the v4 Support Library as part of this library's classpath.
This library depends on the v4 Support Library.
</p>
<p>Here are a few of the key classes included in the v7 appcompat library:</p>
@@ -308,12 +307,10 @@ with a dependency on the v7 appcompat library, so you'll need to include both
libraries in your build path when setting up your project. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. If you are developing in Eclipse/ADT, make sure to include
both the <code>android-support-v7-mediarouter.jar</code> and
<code>android-support-v7-appcompat.jar</code> files.</p>
with resources</a>.</p>
<p>If you are using Android Studio, all you need to do is specify the Gradle build
script dependency identifier <code>com.android.support:support-v7-mediarouter:&lt;revision&gt;</code>,
<p>The Gradle builder script dependency identifier is as follows:
<code>com.android.support:support-v7-mediarouter:&lt;revision&gt;</code>,
where "&lt;revision&gt;" is the minimum revision at which the library is available. For example:</p>
<pre>
@@ -352,8 +349,8 @@ com.android.support:palette-v7:23.1.0
<p>The recyclerview library adds the {@link android.support.v7.widget.RecyclerView}
class. This class provides support for the
<a href="{@docRoot}training/material/lists-cards.html">RecyclerView</a> widget, a view
for efficiently displaying large data sets by providing a
<a href="{@docRoot}training/material/lists-cards.html">RecyclerView</a>
widget, a view for efficiently displaying large data sets by providing a
limited window of data items.</p>
<p>After you download the Android Support Libraries, this library is located in the
@@ -423,7 +420,7 @@ com.android.support:preference-v7:23.1.0
<p class="note">
<strong>Note:</strong> Use of RenderScript with the support library is supported with Android
Studio and Gradle-based builds, as well as the Eclipse plugin and Ant build tools. The
Studio and Gradle-based builds. The
renderscript library is located in the <code>build-tools/$VERSION/renderscript/</code> folder.
</p>

15
docs/html/tools/testing/contentprovider_testing.jd Normal file → Executable file
View File

@@ -48,10 +48,6 @@ parent.link=index.html
href="{@docRoot}tools/testing/testing_android.html">
Testing Fundamentals</a>
</li>
<li>
<a href="{@docRoot}tools/testing/testing_eclipse.html">
Testing From Eclipse with ADT</a>
</li>
<li>
<a href="{@docRoot}tools/testing/testing_otheride.html">
Testing From Other IDEs</a>
@@ -94,11 +90,8 @@ parent.link=index.html
runner {@link android.test.InstrumentationTestRunner}. The section
<a href="{@docRoot}tools/testing/testing_android.html#InstrumentationTestRunner">
Running Tests With InstrumentationTestRunner</a> describes the test runner in
more detail. The topic <a href="{@docRoot}tools/testing/testing_eclipse.html">
Testing From Eclipse with ADT</a> shows you how to run a test package in Eclipse, and the
topic <a href="{@docRoot}tools/testing/testing_otheride.html">
Testing From Other IDEs</a>
shows you how to run a test package from the command line.
more detail. The topic <a href="{@docRoot}tools/testing/testing_otheride.html">
Testing From Other IDEs</a> shows you how to run a test package from the command line.
</p>
<h2 id="ContentProviderTestAPI">Content Provider Testing API</h2>
<p>
@@ -204,9 +197,7 @@ classes</a>.
</ul>
<h2 id="NextSteps">Next Steps</h2>
<p>
To learn how to set up and run tests in Eclipse, please refer to
<a href="{@docRoot}tools/testing/testing_eclipse.html">Testing from Eclipse with ADT</a>.
If you're not working in Eclipse, refer to
To learn how to set up and run tests from other IDEs, please refer to
<a href="{@docRoot}tools/testing/testing_otheride.html">Testing From Other IDEs</a>.
</p>
<p>

2
docs/html/tools/testing/index.jd Normal file → Executable file
View File

@@ -3,7 +3,7 @@ page.title=Testing
<p> The Android framework includes an integrated testing framework that helps you test all aspects
of your application and the SDK tools include tools for setting up and running test applications.
Whether you are working in Eclipse with ADT or working from the command line, the SDK tools help you
Whether you are working in Android Studio or working from the command line, the SDK tools help you
set up and run your tests within an emulator or the device you are targeting. </p>
<p>If you aren't yet familiar with the Android testing framework, start by reading <a

4
docs/html/tools/testing/service_testing.jd Normal file → Executable file
View File

@@ -35,10 +35,6 @@ parent.link=index.html
</ol>
<h2>See Also</h2>
<ol>
<li>
<a href="{@docRoot}tools/testing/testing_eclipse.html">
Testing From Eclipse with ADT</a>
</li>
<li>
<a href="{@docRoot}tools/testing/testing_otheride.html">
Testing From Other IDEs</a>

36
docs/html/tools/testing/testing_android.jd Normal file → Executable file
View File

@@ -67,10 +67,6 @@ parent.link=index.html
</ol>
<h2>See also</h2>
<ol>
<li>
<a href="{@docRoot}tools/testing/testing_eclipse.html">
Testing from Eclipse with ADT</a>
</li>
<li>
<a href="{@docRoot}tools/testing/testing_otheride.html">
Testing from Other IDEs</a>
@@ -110,7 +106,7 @@ parent.link=index.html
you don't need to learn a new set of tools or techniques for designing and building tests.
</li>
<li>
The SDK tools for building and tests are available in Eclipse with ADT, and also in
The SDK tools for building and tests are available in Android Studio, and also in
command-line form for use with other IDEs. These tools get information from the project of
the application under test and use this information to automatically create the build files,
manifest file, and directory structure for the test package.
@@ -162,11 +158,10 @@ parent.link=index.html
Tests, like Android applications, are organized into projects.
</p>
<p>
A test project is a directory or Eclipse project in which you create the source code, manifest
file, and other files for a test package. The Android SDK contains tools for Eclipse with ADT
A test project is a directory in which you create the source code, manifest
file, and other files for a test package. The Android SDK contains tools for Android Studio
and for the command line that create and update test projects for you. The tools create the
directories you use for source code and resources and the manifest file for the test package.
The command-line tools also create the Ant build files you need.
</p>
<p>
You should always use Android tools to create a test project. Among other benefits,
@@ -488,7 +483,7 @@ parent.link=index.html
in the shared library <code>android.test.runner</code>, which is not normally linked to
Android code. To include it, you must specify it in a
<code><a href="{@docRoot}guide/topics/manifest/uses-library-element.html">&lt;uses-library&gt;</a></code>
element. You do not have to set up these elements yourself. Both Eclipse with ADT and the
element. You do not have to set up these elements yourself. Both Android Studio and the
<code>android</code> command-line tool construct them automatically and add them to your
test package's manifest file.
</p>
@@ -499,7 +494,7 @@ parent.link=index.html
</p>
<p>
To run {@link android.test.InstrumentationTestRunner}, you use internal system classes called by
Android tools. When you run a test in Eclipse with ADT, the classes are called automatically.
Android tools. When you run a test in Android Studio the classes are called automatically.
When you run a test from the command line, you run these classes with
<a href="{@docRoot}tools/help/adb.html">Android Debug Bridge (adb)</a>.
</p>
@@ -509,7 +504,7 @@ parent.link=index.html
application under test. They then pass control to
{@link android.test.InstrumentationTestRunner}, which runs
each test case class in the test package. You can also control which test cases and
methods are run using settings in Eclipse with ADT, or using flags with the command-line tools.
methods are run using settings in Android Studio or using flags with the command-line tools.
</p>
<p>
Neither the system classes nor {@link android.test.InstrumentationTestRunner} run
@@ -521,16 +516,14 @@ parent.link=index.html
Activity that displays a Spinner widget.
</p>
<p>
To learn more about running tests, please read the topics
<a href="{@docRoot}tools/testing/testing_eclipse.html">
Testing from Eclipse with ADT</a> or
To learn more about running tests, please read
<a href="{@docRoot}tools/testing/testing_otheride.html">
Testing from Other IDEs</a>.
</p>
<h2 id="TestResults">Seeing Test Results</h2>
<p>
The Android testing framework returns test results back to the tool that started the test.
If you run a test in Eclipse with ADT, the results are displayed in a new JUnit view pane. If
If you run a test in Android Studio, the results are displayed in a new JUnit view pane. If
you run a test from the command line, the results are displayed in <code>STDOUT</code>. In
both cases, you see a test summary that displays the name of each test case and method that
was run. You also see all the assertion failures that occurred. These include pointers to the
@@ -538,10 +531,8 @@ parent.link=index.html
value and actual value.
</p>
<p>
The test results have a format that is specific to the IDE that you are using. The test
results format for Eclipse with ADT is described in
<a href="{@docRoot}tools/testing/testing_eclipse.html#RunTestEclipse">
Testing from Eclipse with ADT</a>. The test results format for tests run from the
The test results have a format that is specific to the IDE that you are using. The test
results format for tests run from the
command line is described in
<a href="{@docRoot}tools/testing/testing_otheride.html#RunTestsCommand">
Testing from Other IDEs</a>.
@@ -628,12 +619,7 @@ The <a href="{@docRoot}tools/help/monkey.html">UI/Application Exerciser Monkey</
Android Virtual Devices configured for the hardware, screens, and versions you want to test.
</p>
<h2 id="NextSteps">Next Steps</h2>
<p>
To learn how to set up and run tests in Eclipse, please refer to
<a href="{@docRoot}tools/testing/testing_eclipse.html">Testing from Eclipse with ADT</a>.
If you're not working in Eclipse, refer to
<a href="{@docRoot}tools/testing/testing_otheride.html">Testing from Other IDEs</a>.
</p>
<p>
If you want a step-by-step introduction to Android testing, try the
<a href="{@docRoot}tools/testing/activity_test.html">Activity Testing Tutorial</a>.

22
docs/html/tools/testing/testing_otheride.jd Normal file → Executable file
View File

@@ -25,7 +25,7 @@ parent.link=index.html
<a href="#RunTestsCommand">Running Tests</a>
<ol>
<li>
<a href="#RunTestsAnt">Quick build and run with Ant</a>
<a href="#RunTestsAnt">Quick build and run with Gradle</a>
</li>
<li>
<a href="#RunTestsDevice">Running tests on a device or emulator</a>
@@ -58,7 +58,7 @@ parent.link=index.html
</div>
<p>
This document describes how to create and run tests directly from the command line.
You can use the techniques described here if you are developing in an IDE other than Eclipse
You can use the techniques described here if you are developing in an IDE other than Android Studio
or if you prefer to work from the command line. This document assumes that you already know how
to create a Android application in your programming environment. Before you start this
document, you should read the topic
@@ -66,19 +66,17 @@ parent.link=index.html
which provides an overview of Android testing.
</p>
<p>
If you are developing in Eclipse with ADT, you can set up and run your tests
directly in Eclipse. For more information, please read
<a href="{@docRoot}tools/testing/testing_eclipse.html">
Testing from Eclipse with ADT</a>.
If you are developing in Android Studio, you can set up and run your tests
directly in Android Studio.
</p>
<h2 id="CreateTestProjectCommand">Working with Test Projects</h2>
<p>
You use the <code>android</code> tool to create test projects.
You also use <code>android</code> to convert existing test code into an Android test project,
or to add the <code>test</code> Ant target to an existing Android test project.
or to add the <code>test</code> Gradle target to an existing Android test project.
These operations are described in more detail in the section <a href="#UpdateTestProject">
Updating a test project</a>. The <code>test</code> target is described in
<a href="#RunTestsAnt">Quick build and run with Ant</a>.
<a href="#RunTestsAnt">Quick build and run with Gradle</a>.
</p>
<h3 id="CreateTestProject">Creating a test project</h3>
<p>
@@ -193,7 +191,7 @@ $ android create test-project -m ../HelloAndroid -n HelloAndroidTest -p HelloAnd
<p>
You use the <code>android</code> tool when you need to change the path to the
project of the application under test. If you are changing an existing test project created in
Eclipse with ADT so that you can also build and run it from the command line, you must use the
Android Studio so that you can also build and run it from the command line, you must use the
"create" operation. See the section <a href="#CreateTestProject">Creating a test project</a>.
</p>
<p class="note">
@@ -293,13 +291,13 @@ $ android create test-project -m ../HelloAndroid -n HelloAndroidTest -p HelloAnd
</p>
<h2 id="RunTestsCommand">Running Tests</h2>
<p>
You run tests from the command line, either with Ant or with an
You run tests from the command line, either with Gradle or with an
<a href="{@docRoot}tools/help/adb.html">
Android Debug Bridge (adb)</a> shell.
</p>
<h3 id="RunTestsAnt">Quick build and run with Ant</h3>
<h3 id="RunTestsAnt">Quick build and run with Gradle</h3>
<p>
You can use Ant to run all the tests in your test project, using the target
You can use Gradle to run all the tests in your test project, using the target
<code>test</code>, which is created automatically when you create a test project with
the <code>android</code> tool.
</p>

31
docs/html/tools/workflow.jd Normal file → Executable file
View File

@@ -2,14 +2,13 @@ page.title=Introduction
@jd:body
<p>Developing applications for Android devices is facilitated by a group of tools that are
provided with the SDK. You can access these tools through an Eclipse plugin called ADT (Android
Development Tools) or from the command line. Developing with Eclipse is the preferred method because
provided with the SDK. You can access these tools through Android Studio or from the command line. Developing with Android Studio is the preferred method because
it can directly invoke the tools that you need while developing applications.</p>
<p>However, you may choose to develop with another IDE or a simple text editor and invoke the
tools on the command line or with scripts. This is a less streamlined way to develop because you
will sometimes have to call command line tools manually, but you will have access to the same
number of features that you would have in Eclipse.</p>
number of features that you would have in Android Studio.</p>
<div class="figure" style="width:461px">
<img src="{@docRoot}images/developing/developing_overview.png"
@@ -20,7 +19,7 @@ page.title=Introduction
</p>
</div>
<p>The basic steps for developing applications (with or without Eclipse) are shown in figure 1. The
<p>The basic steps for developing applications (with or without Android Studio) are shown in figure 1. The
development steps encompass four development phases, which include:</p>
<ul>
@@ -39,13 +38,14 @@ development steps encompass four development phases, which include:</p>
</li>
<li><strong>Debugging and Testing</strong>
<p>During this phase you build your project into a debuggable <code>.apk</code> package that you
can install and run on the emulator or an Android-powered device. If you are using Eclipse,
builds are generated each time you project is saved. If you're using another IDE,
you can build your project using Ant and install it on a device using
<a href="{@docRoot}tools/help/adb.html">adb</a>. For more information, see
can install and run on the emulator or an Android-powered device. Android Studio uses
a build system based on <a href="http://www.gradle.org/" target="_android">Gradle</a>
that provides flexibility, customized build variants, dependency resolution, and much more.
If you're using another IDE, you can build your project using Gradle and install it on a device
using <a href="{@docRoot}tools/help/adb.html">adb</a>. For more information, see
<a href="{@docRoot}tools/building/index.html">Build and run your application</a>.</p>
<p>Next, you debug your application using a JDWP-compliant debugger along with the debugging
and logging tools that are provided with the Android SDK. Eclipse already comes packaged with
and logging tools that are provided with the Android SDK. Android Studio already comes packaged with
a compatible debugger. For more information see,
<a href="{@docRoot}tools/debugging/index.html">Debug your application with the
SDK debugging and logging tools</a>.</p>
@@ -62,7 +62,7 @@ development steps encompass four development phases, which include:</p>
<h2 id="EssentialTools">Essential command line tools</h2>
<p>When developing in IDEs or editors other than Eclipse, be familiar with
<p>When developing in IDEs or editors other than Android Studio, be familiar with
all of the tools below, because you will have to run them from the command line.</p>
<dl>
@@ -84,7 +84,7 @@ development steps encompass four development phases, which include:</p>
source and third-party tools:</p>
<dl>
<dt>Ant</dt>
<a href="http://www.gradle.org/">Gradle</a>
<dd>To compile and build your Android project into an installable .apk file.</dd>
@@ -99,13 +99,13 @@ development steps encompass four development phases, which include:</p>
JDK.</dd>
</dl>
<p>If you are using Eclipse and ADT, tools such as <code>adb</code> and <code>android</code>
are automatically called by Eclipse and ADT so you don't have to manually invoke these tools.
<p>If you are using Android Studio, tools such as <code>adb</code> and <code>android</code>
are automatically called by Android Studio, so you don't have to manually invoke these tools.
You need to be familiar with <code>adb</code>, however, because certain functions are not
accessible from
Eclipse, such as the <code>adb</code> shell commands. You might also need to call Keytool and
Android Studio, such as the <code>adb</code> shell commands. You might also need to call Keytool and
Jarsigner to
sign your applications, but you can set up Eclipse to do this automatically as well.</p>
sign your applications, but you can set up Android Studio to do this automatically as well.</p>
<p>For more information on the tools provided with the Android SDK, see the
<a href="{@docRoot}tools/index.html">Tools</a> section of the documentation.</p>
@@ -147,4 +147,3 @@ src="{@docRoot}images/developing/intellijidea_android_ide.png"/>
<a href="http://wiki.jetbrains.net/intellij/Android">IntelliJ IDEA Android Tutorials</a>
</li>
</ul>