Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07fe016b authored by Andrew Solovay's avatar Andrew Solovay
Browse files

docs: Removed reference to Android Support Library

In the Android Studio world, devs download the Android Support
*Repository*, not the now-deprecated *Library*. Updated the prose
and a screenshot to reflect this. Did other cleanup to docs to make
them more consistent with the new Android Studio/Gradle world. (For
example, the process for adding a library is now the same whether
or not the library has resources, so I consolidated the two "adding
a library" sections, and removed the paragraphs from features.html
that specified whether or not a library had resources.)

Also fixed bad formatting of code snippets (once again, we got bit by
the {@code &lt;} issue). Changed the {@code} tags to <code></code> to
fix it.

Other misc. fixes too, as they popped up in the review process.

See first comment for doc stage location.

bug: 30269620
Change-Id: I72922655e9887d1365e97b75982432c97e041f1f
parent ae47d9d4
Loading
Loading
Loading
Loading
+36.7 KiB (89.3 KiB)
Loading image diff...
+18 −145
Original line number Original line Diff line number Diff line
@@ -141,19 +141,13 @@ page.title=Support Library Features
  API reference.
  API reference.
</p>
</p>


<p>After you download the Android Support Libraries, this library is located in the
<code>&lt;sdk&gt;/extras/android/support/v4/</code> directory. The library does not contain user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p>

<p class="caution"><strong>Caution:</strong> Using dynamic dependencies, especially for higher version
<p class="caution"><strong>Caution:</strong> Using dynamic dependencies, especially for higher version
numbers, can cause unexpected version updates and regression incompatibilities.</p>
numbers, can cause unexpected version updates and regression incompatibilities.</p>


<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:support-v4:23.3.0
com.android.support:support-v4:24.1.1
</pre>
</pre>




@@ -167,15 +161,6 @@ com.android.support:support-v4:23.3.0
  Building Apps with Over 64K Methods</a>.
  Building Apps with Over 64K Methods</a>.
</p>
</p>


<p>
  After you download the Android Support Libraries, this library is located in the
  <code>&lt;sdk&gt;/extras/android/support/multidex/</code> directory. The library does not contain
  user interface resources. To include it in your application project, follow the instructions
  for
  <a href= "{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
  resources</a>.
</p>

<p>
<p>
  The Gradle build script dependency identifier for this library is as follows:
  The Gradle build script dependency identifier for this library is as follows:
</p>
</p>
@@ -228,16 +213,10 @@ com.android.support:multidex:1.0.0
  </li>
  </li>
</ul>
</ul>


<p>After you download the Android Support Libraries, this library is located in the
<code>&lt;sdk&gt;/extras/android/support/v7/appcompat/</code> directory. The library contains user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries with
resources</a>.</p>

<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:appcompat-v7:23.3.0
com.android.support:appcompat-v7:24.1.1
</pre>
</pre>




@@ -249,16 +228,10 @@ widget, which lets you show information inside cards that have a consistent look
on any app. These cards are useful for material design
on any app. These cards are useful for material design
implementations, and are used extensively in layouts for TV apps.</p>
implementations, and are used extensively in layouts for TV apps.</p>


<p>After you download the Android Support Libraries, this library is located in the
<code>&lt;sdk&gt;/extras/android/support/v7/cardview/</code> directory. The library contains user interface
resources. To include it in your application project, follow the instructions
for <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding
libraries with resources</a>.</p>

<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:cardview-v7:23.3.0
com.android.support:cardview-v7:24.1.1
</pre>
</pre>




@@ -271,16 +244,10 @@ allows you to arrange user interface elements using a grid of rectangular cells.
For detailed information about the v7 gridlayout library APIs, see the
For detailed information about the v7 gridlayout library APIs, see the
{@link android.support.v7.widget android.support.v7.widget} package in the API reference.</p>
{@link android.support.v7.widget android.support.v7.widget} package in the API reference.</p>


<p>This library is located in the <code>&lt;sdk&gt;/extras/android/support/v7/gridlayout/</code>
  directory . The library contains user
  interface resources. To include it in your application project, follow the instructions for
  <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries with
  resources</a>.</p>

<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:gridlayout-v7:23.3.0
com.android.support:gridlayout-v7:24.1.1
</pre>
</pre>




@@ -300,21 +267,10 @@ information about the v7 mediarouter library APIs, see the
{@link android.support.v7.media android.support.v7.media} package in the API
{@link android.support.v7.media android.support.v7.media} package in the API
reference.</p>
reference.</p>


<p>The v7 mediarouter library is located in the
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<code>&lt;sdk&gt;/extras/android/support/v7/mediarouter/</code> directory after
you download the Android Support Library. It's provided as a library project
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>.</p>

<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>
<pre>
com.android.support:mediarouter-v7:23.3.0
com.android.support:mediarouter-v7:24.1.1
</pre>
</pre>


<p class="caution">The v7 mediarouter library APIs introduced in Support Library
<p class="caution">The v7 mediarouter library APIs introduced in Support Library
@@ -331,16 +287,10 @@ prominent colors from an image. For example, a music app could use a
from an album cover, and use those colors to build a color-coordinated song
from an album cover, and use those colors to build a color-coordinated song
title card.</p>
title card.</p>


<p>After you download the Android Support Libraries, this library is located in the
<code>&lt;sdk&gt;/extras/android/support/v7/palette/</code> directory. The library does not contain
user interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p>

<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:palette-v7:23.3.0
com.android.support:palette-v7:24.1.1
</pre>
</pre>




@@ -353,16 +303,10 @@ class. This class provides support for the
widget, a view for efficiently displaying large data sets by providing a
widget, a view for efficiently displaying large data sets by providing a
limited window of data items.</p>
limited window of data items.</p>


<p>After you download the Android Support Libraries, this library is located in the
<code>&lt;sdk&gt;/extras/android/support/v7/recyclerview/</code> directory. The library contains
user interface resources. To include it in your application project, follow the instructions
for <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding
libraries with resources</a>.</p>

<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:recyclerview-v7:23.3.0
com.android.support:recyclerview-v7:24.1.1
</pre>
</pre>




@@ -382,25 +326,12 @@ such as {@link android.support.v7.preference.CheckBoxPreference} and
{@link android.support.v7.preference.ListPreference}.  </p>
{@link android.support.v7.preference.ListPreference}.  </p>




<p>After you download the Android Support Libraries, this library is located in the
<code>&lt;sdk&gt;/extras/android/support/v7/preference</code> directory. 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>. </p>

<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:preference-v7:23.3.0
com.android.support:preference-v7:24.1.1
</pre>
</pre>









<h2 id="v8">v8 Support Library</h2>
<h2 id="v8">v8 Support Library</h2>


<p>This library is designed to be used with Android 2.2 (API level 8) and higher.
<p>This library is designed to be used with Android 2.2 (API level 8) and higher.
@@ -446,16 +377,10 @@ defaultConfig {
  android.support.v13} package in the API reference.
  android.support.v13} package in the API reference.
</p>
</p>


<p>After you download the Android Support Libraries, this library is located in the
<code>&lt;sdk&gt;/extras/android/support/v13/</code> directory. The library does not contain user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p>

<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:support-v13:23.3.0
com.android.support:support-v13:24.1.1
</pre>
</pre>




@@ -478,16 +403,10 @@ for preference interfaces such as
  package in the API reference.
  package in the API reference.
</p>
</p>


<p>After you download the Android Support Libraries, this library is located in the
<code>&lt;sdk&gt;/extras/android/support/v14/</code> directory. The library does not contain user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p>

<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:preference-v14:23.3.0
com.android.support:preference-v14:24.1.1
</pre>
</pre>




@@ -507,16 +426,10 @@ interface and classes, such as
  package in the API reference.
  package in the API reference.
</p>
</p>


<p>After you download the Android Support Libraries, this library is located in the
<code>&lt;sdk&gt;/extras/android/support/v17/</code> directory. The library does not contain user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p>

<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:preference-leanback-v17:23.3.0
com.android.support:preference-leanback-v17:24.1.1
</pre>
</pre>




@@ -549,16 +462,10 @@ com.android.support:preference-leanback-v17:23.3.0
    into a {@link android.support.v17.leanback.app.RowsFragment}.</li>
    into a {@link android.support.v17.leanback.app.RowsFragment}.</li>
</ul>
</ul>


<p>After you download the Android Support Libraries, this library is located in the
<code>&lt;sdk&gt;/extras/android/support/v17/leanback</code> directory. 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>. </p>

<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:leanback-v17:23.3.0
com.android.support:leanback-v17:24.1.1
</pre>
</pre>




@@ -570,16 +477,10 @@ package provides APIs to support adding annotation metadata to your apps. </p>


<p></p>
<p></p>


<p>After you download the Android Support Libraries, this library is located in the
<code>&lt;sdk&gt;/extras/android/support/annotations</code> directory. 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>. </p>

<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:support-annotations:23.3.0
com.android.support:support-annotations:24.1.1
</pre>
</pre>




@@ -594,17 +495,10 @@ provides APIs to support adding material design components and patterns to your
app developers to build upon, such as navigation drawers, floating action buttons (<i>FAB</i>),
app developers to build upon, such as navigation drawers, floating action buttons (<i>FAB</i>),
snackbars, and <a href="{@docRoot}design/building-blocks/tabs.html">tabs</a>.  </p>
snackbars, and <a href="{@docRoot}design/building-blocks/tabs.html">tabs</a>.  </p>



<p>After you download the Android Support Libraries, this library is located in the
<code>&lt;sdk&gt;/extras/android/support/design</code> directory. 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>. </p>

<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:design:23.3.0
com.android.support:design:24.1.1
</pre>
</pre>




@@ -622,17 +516,10 @@ and
<a href="{@docRoot}reference/android/support/customtabs/CustomTabsCallback.html">Custom Tabs
<a href="{@docRoot}reference/android/support/customtabs/CustomTabsCallback.html">Custom Tabs
Callback</a>.  </p>
Callback</a>.  </p>



<p>After you download the Android Support Libraries, this library is located in the
<code>&lt;sdk&gt;/extras/android/support/customtabs</code> directory. 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>. </p>

<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:customtabs:23.3.0
com.android.support:customtabs:24.1.1
</pre>
</pre>




@@ -653,17 +540,10 @@ and
<a href="{@docRoot}reference/android/support/percent/PercentRelativeLayout.html">
<a href="{@docRoot}reference/android/support/percent/PercentRelativeLayout.html">
PercentRelativeLayout</a>.  </p>
PercentRelativeLayout</a>.  </p>



<p>After you download the Android Support Libraries, this library is located in the
<code>&lt;sdk&gt;/extras/android/support/percent</code> directory. 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>. </p>

<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:percent:23.3.0
com.android.support:percent:24.1.1
</pre>
</pre>




@@ -683,15 +563,8 @@ and
<a href="{@docRoot}reference/android/support/app/recommendation/RecommendationExtender.html">
<a href="{@docRoot}reference/android/support/app/recommendation/RecommendationExtender.html">
RecommendationExtender</a>.  </p>
RecommendationExtender</a>.  </p>



<p>After you download the Android Support Libraries, this library is located in the
<code>&lt;sdk&gt;/extras/android/support/recommendation</code> directory. 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>. </p>

<p>The Gradle build script dependency identifier for this library is as follows:</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:recommendation:23.3.0
com.android.support:recommendation:24.1.1
</pre>
</pre>
+10 −73
Original line number Original line Diff line number Diff line
@@ -10,18 +10,12 @@ page.title=Support Library Setup
    <ol>
    <ol>
      <li><a href="#download">Downloading the Support Library</a></li>
      <li><a href="#download">Downloading the Support Library</a></li>
      <li><a href="#choosing">Choosing Support Libraries</a></li>
      <li><a href="#choosing">Choosing Support Libraries</a></li>
      <li><a href="#add-library">Adding Support Libraries</a>
      <li><a href="#add-library">Adding Support Libraries</a></li>
        <ol>
          <li><a href="#libs-without-res">Adding libraries without resources</a></li>
          <li><a href="#libs-with-res">Adding libraries with resources</a></li>
        </ol>
      </li>
      <li><a href="#using-apis">Using Support Library APIs</a>
      <li><a href="#using-apis">Using Support Library APIs</a>
        <ol>
        <ol>
          <li><a href="#manifest">Manifest Declaration Changes</a></li>
          <li><a href="#manifest">Manifest Declaration Changes</a></li>
        </ol>
        </ol>
      </li>
      </li>
      <li><a href="#samples">Code Samples</a></li>
    </ol>
    </ol>


    <h2>See also</h2>
    <h2>See also</h2>
@@ -45,8 +39,8 @@ page.title=Support Library Setup


<h2 id="download">Downloading the Support Libraries</h2>
<h2 id="download">Downloading the Support Libraries</h2>


<p>The Android Support Library package is provided as a supplemental download to the Android SDK
<p>The Android Support Repository package is provided as a supplemental download
  and is available through the Android
 to the Android SDK and is available through the Android
  <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>. Follow the
  <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>. Follow the
  instructions below to obtain the Support Library files.
  instructions below to obtain the Support Library files.
</p>
</p>
@@ -57,22 +51,18 @@ page.title=Support Library Setup
  <li>Start the Android <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>.</li>
  <li>Start the Android <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>.</li>
  <li>In the SDK Manager window, scroll to the end of the <em>Packages</em> list,
  <li>In the SDK Manager window, scroll to the end of the <em>Packages</em> list,
    find the <em>Extras</em> folder and, if necessary, expand to show its contents.</li>
    find the <em>Extras</em> folder and, if necessary, expand to show its contents.</li>
  <li>Select the <strong>Android Support Library</strong> item.
  <li>Select the <strong>Android Support Repository</strong> item.</li>
    <p class="note">
      <strong>Note:</strong> If you're developing with Android Studio, select and install the
      <strong>Android Support Repository</strong> item instead.
    </p>
  </li>
  <li>Click the <strong>Install packages...</strong> button.</li>
  <li>Click the <strong>Install packages...</strong> button.</li>
</ol>
</ol>


<img src="{@docRoot}images/tools/sdk-manager-support-libs.png" width="525" alt="" />
<img src="{@docRoot}images/tools/sdk-manager-support-libs.png" width="525" alt="" />
<p class="img-caption"><strong>Figure 1.</strong> The Android SDK Manager with the
<p class="img-caption"><strong>Figure 1.</strong> The Android SDK Manager with
Android Support Library selected.</p>
Android Support Repository selected.</p>


<p>After downloading, the tool installs the Support Library files to your existing Android SDK
<p>After downloading, the tool installs the Support Library files to your existing Android SDK
  directory. The library files are located in the following subdirectory of your SDK:
  directory. The library files are located in the following subdirectory of your SDK:
  {@code &lt;sdk&gt;/extras/android/support/} directory.</p>
  <code>&lt;sdk&gt;/extras/android/m2repository/com/android/support/</code>
  directory.</p>




<h2 id="choosing">Choosing Support Libraries</h2>
<h2 id="choosing">Choosing Support Libraries</h2>
@@ -89,20 +79,7 @@ Android Support Library selected.</p>
  classpath dependencies within your development environment. You must perform this procedure for
  classpath dependencies within your development environment. You must perform this procedure for
  each Support Library you want to use.</p>
  each Support Library you want to use.</p>


<p>Some Support Libraries contain resources beyond compiled code classes, such as images or XML
<p>To add a Support Library to your application project:</p>
  files. For example, the <a href="{@docRoot}tools/support-library/features.html#v7-appcompat">v7
  appcompat</a> and <a href="{@docRoot}tools/support-library/features.html#v7-gridlayout">v7
  gridlayout</a> libraries include resources.</p>

<p>If you are not sure if a library contains resources, check the
  <a href="{@docRoot}tools/support-library/features.html">Support Library Features</a> page.
  The following sections describe how to add a Support Library with or without resources to your
  application project. </p>


<h3 id="libs-without-res">Adding libraries without resources</h3>

<p>To add a Support Library without resources to your application project:</p>


    <ol>
    <ol>
      <li>Make sure you have downloaded the <strong>Android Support Repository</strong>
      <li>Make sure you have downloaded the <strong>Android Support Repository</strong>
@@ -113,37 +90,12 @@ Android Support Library selected.</p>
<pre>
<pre>
dependencies {
dependencies {
    ...
    ...
    <b>compile "com.android.support:support-v4:18.0.+"</b>
    <b>compile "com.android.support:support-v4:24.1.1"</b>
}
}
</pre>
</pre>
      </li>
      </li>
    </ol>
    </ol>



<h3 id="libs-with-res">Adding libraries with resources</h3>

<p>To add a Support Library with resources (such as
  <a href="{@docRoot}tools/support-library/features.html#v7-appcompat">v7
  appcompat</a> for action bar) to your application project:</p>

    <ol>
      <li>Make sure you have downloaded the <strong>Android Support Repository</strong>
        using the <a href="#download">SDK Manager</a>.</li>
      <li>Open the {@code build.gradle} file for your application.</li>
      <li>Add the support library feature project identifier to the {@code dependencies} section.
        For example, to include the {@code appcompat} project add
        {@code compile "com.android.support:appcompat-v7:18.0.+"} to the dependencies section, as
        shown in the following example:
<pre>
dependencies {
    ...
    <b>compile "com.android.support:appcompat-v7:18.0.+"</b>
}
</pre>
      </li>
    </ol>


<h2 id="using-apis">Using Support Library APIs</h2>
<h2 id="using-apis">Using Support Library APIs</h2>


<p>Support Library classes that provide support for existing framework APIs typically have the
<p>Support Library classes that provide support for existing framework APIs typically have the
@@ -224,18 +176,3 @@ android {
  <code>"4"</code>). The highest support library level you include in your application determines
  <code>"4"</code>). The highest support library level you include in your application determines
  the lowest API version in which it can operate.
  the lowest API version in which it can operate.
</p>
</p>


<h2 id="samples">Code Samples</h2>

<p>Each Support Library includes code samples to help you get started using the support
APIs. The code is included in the download from the SDK Manager and is placed inside the Android
SDK installation directory, as listed below:</p>

<ul>
  <li>4v Samples: {@code &lt;sdk&gt;/extras/android/support/samples/Support4Demos/}</li>
  <li>7v Samples: {@code &lt;sdk&gt;/extras/android/support/samples/Support7Demos/}</li>
  <li>13v Samples: {@code &lt;sdk&gt;/extras/android/support/samples/Support13Demos/}</li>
  <li>App Navigation: {@code &lt;sdk&gt;/extras/android/support/samples/SupportAppNavigation/}</li>
</ul>