summaryrefslogtreecommitdiffstats
path: root/docs/html/tools
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html/tools')
-rw-r--r--docs/html/tools/building/building-cmdline-ant.jd8
-rw-r--r--docs/html/tools/building/configuring-gradle.jd69
-rw-r--r--docs/html/tools/building/manifest-merge.jd510
-rw-r--r--docs/html/tools/help/adt.jd19
-rw-r--r--docs/html/tools/studio/eclipse-transition-guide.jd773
-rw-r--r--docs/html/tools/studio/index.jd323
-rw-r--r--docs/html/tools/studio/studio-config.jd174
-rw-r--r--docs/html/tools/studio/studio-features.jd123
-rw-r--r--docs/html/tools/tools_toc.cs26
-rw-r--r--docs/html/tools/workflow/index.jd14
10 files changed, 1698 insertions, 341 deletions
diff --git a/docs/html/tools/building/building-cmdline-ant.jd b/docs/html/tools/building/building-cmdline-ant.jd
index 51158de..add6ca2 100644
--- a/docs/html/tools/building/building-cmdline-ant.jd
+++ b/docs/html/tools/building/building-cmdline-ant.jd
@@ -31,6 +31,14 @@ Emulator</a></li>
</div>
</div>
+<p class="caution">
+ <strong>Important:</strong> Support for Ant as a build tool for Android is ending, per our
+ <a href="http://android-developers.blogspot.com/2015/06/an-update-on-eclipse-android-developer.html"
+ class="external-link">announcement</a>. 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 <a href="{@docRoot}sdk/installing/migrate.html">Migrating to Android Studio</a>.
+</p>
+
<p>There are two ways to build your application using the Ant build script: one for
testing/debugging your application &mdash; <em>debug mode</em> &mdash; and one for building your
final package for release &mdash; <em>release mode</em>. Regardless of which way you build your application,
diff --git a/docs/html/tools/building/configuring-gradle.jd b/docs/html/tools/building/configuring-gradle.jd
index 7cca5b4..73a048b 100644
--- a/docs/html/tools/building/configuring-gradle.jd
+++ b/docs/html/tools/building/configuring-gradle.jd
@@ -198,6 +198,75 @@ settings from the Android SDK installation. Android Studio adds the module-speci
<code>proguard-rules.pro</code> at the root of the module, where you can add custom ProGuard
rules.</p>
+
+
+<h3>Application ID for package identification </h3>
+<p>With the Android build system, the <em>applicationId</em> attribute is used to
+uniquely identify application packages for publishing. The application ID is set in the
+<em>android</em> section of the <code>build.gradle</code> file.
+</p>
+
+ <pre>
+ apply plugin: 'com.android.application'
+
+ android {
+ compileSdkVersion 19
+ buildToolsVersion "19.1"
+
+ defaultConfig {
+ <strong>applicationId "com.example.my.app"</strong>
+ minSdkVersion 15
+ targetSdkVersion 19
+ versionCode 1
+ versionName "1.0"
+ }
+ ...
+ </pre>
+
+<p class="note"><strong>Note:</strong> The <em>applicationId</em> is specified only in your
+{@code build.gradle} file, and not in the AndroidManifest.xml file.</p>
+
+<p>When using build variants, the build system enables you to uniquely identify different
+packages for each product flavors and build types. The application ID in the build type is added as
+a suffix to those specified for the product flavors. </p>
+
+ <pre>
+ productFlavors {
+ pro {
+ applicationId = "com.example.my.pkg.pro"
+ }
+ free {
+ applicationId = "com.example.my.pkg.free"
+ }
+ }
+
+ buildTypes {
+ debug {
+ applicationIdSuffix ".debug"
+ }
+ }
+ ....
+ </pre>
+
+<p>The package name must still be specified in the manifest file. It is used in your source code
+to refer to your R class and to resolve any relative activity/service registrations. </p>
+
+ <pre>
+ <?xml version="1.0" encoding="utf-8"?>
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ <strong>package="com.example.app"</strong>>
+ </pre>
+
+<p class="note"><strong>Note:</strong> If you have multiple manifests (for example, a product
+flavor specific manifest and a build type manifest), the package name is optional in those manifests.
+If it is specified in those manifests, the package name must be identical to the package name
+specified in the manifest in the <code>src/main/</code> folder. </p>
+
+<p>For more information about the build files and process, see
+<a href="{@docRoot}sdk/installing/studio-build.html">Build System Overview</a>.</p>
+
+
+
<h3 id="configureSigning">Configure signing settings</h3>
<p>The debug and the release versions of the app differ on whether the application can be
diff --git a/docs/html/tools/building/manifest-merge.jd b/docs/html/tools/building/manifest-merge.jd
new file mode 100644
index 0000000..54166ec
--- /dev/null
+++ b/docs/html/tools/building/manifest-merge.jd
@@ -0,0 +1,510 @@
+page.title=Manifest Merging
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#merge-rules">Merge Conflict Rules</a></li>
+ <li><a href="#markers-selectors">Merge Conflict Markers and Selectors</a></li>
+ <li><a href="#inject-values">Injecting Build Values into a Manifest</a></li>
+ <li><a href="#merge-prodflavorsGroups">Manifest Merging Across Product Flavor Groups</a></li>
+ <li><a href="#implicit-permissions">Implicit Permissions</a></li>
+ <li><a href="#merge-errors">Handling Manifest Merge Build Errors</a></li>
+ </ol>
+
+ <h2>See also</h2>
+ <ol>
+ <li><a href="{@docRoot}sdk/installing/studio-build.html">Build System Overview</a></li>
+ <li><a href="{@docRoot}tools/building/configuring-gradle.html">Configuring Gradle Builds</a> </li>
+ </ol>
+
+</div>
+</div>
+
+
+<p>With Android Studio and <a href="http://www.gradle.org">Gradle</a>-based builds, each app can
+contain manifest files in multiple locations, such as the <code>src/main/</code> folder for
+the <code>productFlavor</code>, libraries, Android ARchive (AAR) bundles of Android Library
+projects, and dependencies. During the build process, manifest merging combines the settings from
+the various <code>AndroidManifest.xml</code> files included in your app into a single, generated APK
+manifest file for app packaging and distribution. Manifest settings are merged based on the manifest
+priority, determined by the manifest's file location. Building your app merges the
+manifest elements, attributes, and sub-elements from these manifests for the specified
+<a href="{@docRoot}tools/building/configuring-gradle.html#workBuildVariants">build variant</a>.</p>
+
+
+<h2 id="merge-rules">Merge Conflict Rules</h2>
+<p>Merge conflicts occur when merged manifests contain the same manifest element but with a
+different attribute value that does not resolve based on the default merge conflict rules.
+<a href="#markers-selectors">Conflict markers and selectors</a> can also define custom merge rules,
+such as allowing an imported library to have a <code>minSdkVersion</code> higher than the
+version defined in the other higher priority manifests. </p>
+
+<p>The manifest merge priority determines which manifest settings are retained in merge conflicts,
+with the settings in higher priority manifest overwriting those in lower priority manifests.
+The following list details which manifest settings are are the highest priority during the merge
+process:</p>
+
+<ul>
+ <li>Highest priority: <code>buildType</code> manifest settings </li>
+ <li>Higher priority: <code>productFlavor</code> manifest settings </li>
+ <li>Medium priority: Manifests in the <code>src/main/</code> directory of an app project</li>
+ <li>Low priority: Dependency and library manifest settings </li>
+</ul>
+
+<p>Manifest merge conflicts are resolved at the XML node and
+attribute levels based on the following merge rules. </p>
+
+<table>
+ <tr>
+ <th scope="col">High Priority Element</th>
+ <th scope="col">Low Priority Element</th>
+ <th scope="col">Manifest Merge Result</th>
+ </tr>
+ <tr>
+ <td rowspan="3">no attribute</td>
+ <td>no attribute</td>
+ <td>no attribute</td>
+ </tr>
+ <tr>
+
+ <td>attribute set to default</td>
+ <td>default attribute</td>
+ </tr>
+ <tr>
+
+ <td>attribute set to non-default </td>
+ <td>low priority attribute</td>
+ </tr>
+ <tr>
+ <td>attribute set to default</td>
+ <td rowspan="2">no attribute</td>
+ <td>default attribute</td>
+ </tr>
+ <tr>
+ <td>attribute set to non-default </td>
+
+ <td>high priority attribute</td>
+ </tr>
+ <tr>
+ <td>attribute set to default</td>
+ <td>attribute set to default</td>
+ <td>default attribute</td>
+ </tr>
+ <tr>
+ <td>attribute set to default</td>
+ <td>attribute set to non-default </td>
+ <td>low priority attribute</td>
+ </tr>
+ <tr>
+ <td>attribute set to non-default</td>
+ <td>attribute set to default</td>
+ <td>high priority attribute</td>
+ </tr>
+ <tr>
+ <td>attribute set to non-default</td>
+ <td>attribute set to non-default </td>
+ <td>Merge if settings match, otherwise causes conflict error.</td>
+ </tr>
+ </table>
+
+
+
+<p>Exceptions to the manifest merge rules: </p>
+
+<ul>
+ <li>The <code>uses-feature android:required;</code> and
+ <code>uses-library android:required</code> elements default to <code>true</code> and use
+ an <em>OR</em> merge so that any required feature or library is included in the generated APK. </li>
+
+ <li>If not declared, the
+ <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
+ elements, <code>minSdkVersion</code> and
+ <code>targetSdkVersion</code>, default to a value of 1. When
+ merge conflicts occur, the value in the higher priority manifest version is used.</li>
+
+ <li>Importing a library with a <code>minSdkVersion</code> value higher than the app's
+ <code>src/main/</code> manifest manifest generates an error unless
+ the <code>overrideLibrary</code> conflict marker is used.
+
+ <p class="note"><strong>Note:</strong> If not explicitly declared, the <code>targetSdkVersion</code>
+ defaults to the <code>minSdkVersion</code> value. When no <code><uses-sdk></code> element is
+ present in any manifest or the <code>build.gradle</code> file, the
+ <code>minSdkVersion</code> defaults to 1.</p> </li>
+
+ <li>When importing a library with a <code>targetSdkVersion</code> value lower than the app's
+ <code>src/main/</code> manifest, the manifest merge
+ process explicitly grants permissions and ensures that the imported library functions properly. </li>
+
+ <li>The <code>manifest</code> element only merges with child manifest elements. </li>
+
+ <li>The <code>intent-filter</code> element is never changed and is always added to the common
+ parent node in the merged manifest. </li>
+</ul>
+
+<p class="caution"><strong>Important:</strong> After the manifests are merged, the build process
+overrides the final manifest settings with any settings that are also in the
+<code>build.gradle</code> file. For more details, see
+<a href="{@docRoot}tools/building/configuring-gradle.html">Configuring Gradle Builds</a>. </p>
+
+
+
+<h2 id="markers-selectors">Merge Conflict Markers and Selectors</h2>
+<p>Manifest markers and selectors override the default merge rules through
+specific conflict resolutions. For example, use a conflict marker to
+merge a library manifest with a higher <code>minSdkVersion</code> value than the higher priority
+manifest, or to merge manifests with the same activity but different <code>android:theme</code>
+values. </p>
+
+<h3 id="conflict-markers">Merge Conflict Markers</h3>
+<p>A merge conflict marker is a special attribute in the Android tools namespace that defines a
+specific merge conflict resolution. Create a conflict marker to avoid a merge conflict error for
+conflicts not resolved by the default merge rules. Supported merge conflict markers include:</p>
+
+<dl>
+ <dt><code>merge</code></dt>
+ <dd>Merges attributes when there are no conflicts with the merge rules. The default merge
+ action.</dd>
+ <dt><code>replace</code></dt>
+ <dd>Replaces attributes in the lower priority manifest with those from the higher priority
+ manifest.</dd>
+ <dt><code>strict</code></dt>
+ <dd>Sets the merge policy level so that merged elements with same attributes, but different
+ values generate a build failure, unless resolved through the conflict rules.</dd>
+ <dt><code>merge-only</code></dt>
+ <dd>Allows merge actions for only lower priority attributes.</dd>
+ <dt><code>remove</code></dt>
+ <dd>Removes the specified lower priority element from the merged manifest.</dd>
+ <dt><code>remove-All</code></dt>
+ <dd>Removes all lower priority elements of the same node type from the merged manifest.</dd>
+</dl>
+
+
+<p>By default, the manifest merge process applies the <code>merge</code> conflict marker to
+the node level. All declared manifest attributes default to a <code>strict</code>
+merging policy. </p>
+
+<p>To set a merge conflict marker, first declare the namespace in the
+<code>AndroidManifest.xml</code> file. Then, enter the merge conflict marker in the manifest to
+specify a custom merge conflict action. This example inserts the <code>replace</code> marker to
+set a replace action to resolve conflicts between the <code>android:icon</code> and
+<code>android:label</code> manifest elements. </p>
+
+<pre>
+
+&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.tests.flavorlib.app"
+ xmlns:tools="http://schemas.android.com/tools"&gt;
+
+ &lt;application
+ android:icon="&#64;drawable/icon"
+ android:label="&#64;string/app_name"
+ tools:replace="icon, label"&gt;
+ ...
+
+</manifest>
+
+</pre>
+
+
+<h4>Marker attributes</h4>
+<p>Conflict markers use <code>tools:node</code> and <code>tools:attr</code> attributes to
+restrict merge actions at the XML node or attribute level. </p>
+
+<p>The <code>tools:attr</code> markers use only the <code>restrict</code>, <code>remove</code>, and
+<code>replace</code> merge actions. Multiple <code>tools:attr</code> marker values can be applied
+to a specific element. For example, use <code>tools:replace="icon, label, theme"</code> to replace
+lower priority <code>icon</code>, <code>label</code>, and <code>theme</code> attributes. </p>
+
+
+<h4>Merge conflict marker for imported libraries</h4>
+<p>The <code>overrideLibrary</code> conflict marker applies to the <code>&lt;uses-sdk&gt;</code>
+manifest declaration and is used to import a library even though the library's
+<code>&lt;uses-sdk&gt;</code> values, such as <code>minSdkVersion</code>
+are set to different values than those in the other higher priority manifests. </p>
+
+<p>Without this marker, library manifest merge conflicts from the
+<code>&lt;uses-sdk&gt;</code> values cause the merge process to fail.</p>
+
+<p>This example applies the <code>overrideLibrary</code> conflict marker to resolve the merge
+conflict between <code>minSdkVersion</code> values in the <code>src/main/</code> manifest and an
+imported library manifest.
+
+
+<p><code>src/main/</code> manifest: </p>
+<pre>
+&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.example.app"
+ xmlns:tools="http://schemas.android.com/tools"&gt;
+ ...
+ &lt;uses-sdk android:targetSdkVersion="22" android:minSdkVersion="2"
+ tools:overrideLibrary="com.example.lib1, com.example.lib2"/&gt;
+ ...
+</pre>
+
+<p>Library manifest: </p>
+
+<pre>
+&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.example.lib1"&gt;
+ ...
+ &lt;uses-sdk android:minSdkVersion="4" /&gt;
+ ...
+ &lt;/manifest&gt;
+</pre>
+
+<p class="note"><strong>Note:</strong> The default merge process does not allow importing a library
+with a higher <code>minSdkVersion</code> than the app's <code>src/main/</code> manifest unless
+the <code>overrideLibrary</code> conflict marker is used. </p>
+
+
+
+<h3 id="marker-selectors">Marker Selectors</h3>
+<p>Marker selectors limit a merge action to a specific lower priority manifest. For example, a
+marker selector can be used to remove a permission from only one library, while allowing the
+same permission from other libraries.</p>
+
+<p>This example uses the <code>tools:node</code> marker to remove the <code>permisionOne</code>
+attribute, while the <code>tools:selector</code> selector specifies the specific library as
+<em>com.example.lib1</em>. The <code>permisionOne</code> permission is filtered from only the
+<code>lib1</code> library manifests. </p>
+
+<pre>
+&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.example.app"
+ xmlns:tools="http://schemas.android.com/tools"&gt;
+ ...
+ &lt;permission
+ android:name="permissionOne"
+ tools:node="remove"
+ tools:selector="com.example.lib1"&gt;
+ ...
+</pre>
+
+
+
+<h2 id="inject-values">Injecting Build Values into a Manifest</h2>
+<p>Manifest merging can also be configured to use manifest placeholders to inject
+property values from the <code>build.gradle</code> file into the manifest attributes. </p>
+
+<p>Manifest placeholders use the syntax <code>&#36;{name}</code> for attribute values, where
+<code>name</code> is the injected <code>build.gradle</code> property. The <code>build.gradle</code>
+file uses the <code>manifestPlaceholders</code> property to define the placeholder values. </p>
+
+<p class="note"><strong>Note:</strong> Unresolved placeholder names in apps cause build failures.
+Unresolved placeholder names in libraries generate warnings and need to be resolved when importing
+the library into an app.</p>
+
+<p>This example shows the manifest placeholder <code>&#36;{applicationId}</code> used to inject the
+<code>build.gradle</code> <code>applicationId</code> property value in to <code>android:name</code>
+attribute value. </p>
+
+<p class="note"><strong>Note:</strong> Android Studio provides a default
+<code>&#36;{applicationId}</code> placeholder for the <code>build.gradle</code>
+<code>applicationId</code> value that is not shown in the build file.</p>
+
+
+<p>Manifest entry:</p>
+
+<pre>
+
+&lt;activity
+android:name=".Main"&gt;
+ &lt;intent-filter&gt;
+ &lt;action android:name="&#36;{applicationId}.foo"&gt;
+ &lt;/action&gt;
+&lt;/intent-filter&gt;
+&lt;/activity&gt;
+
+</pre>
+
+
+<p>Gradle build file:</p>
+
+<pre>
+android {
+ compileSdkVersion 22
+ buildToolsVersion "22.0.1"
+
+ productFlavors {
+ flavor1 {
+ applicationId = "com.mycompany.myapplication.productFlavor1"
+ }
+}
+
+</pre>
+
+<p>Merged manifest value: </p>
+
+<pre>
+&lt;action android:name="com.mycompany.myapplication.productFlavor1.foo"&gt;
+</pre>
+
+
+<p>The manifest placeholder syntax and build file <code>manifestPlaceholders</code>
+property can be used to inject other manifest values. For properties other than the
+<code>applicationId</code>, the <code>manifestPlaceholders</code> property is explicitly declared
+in the <code>build.gradle</code> file. This example shows the manifest placeholder for injecting
+<code>activityLabel</code> values.</p>
+
+<p>Gradle build file: </p>
+
+<pre>
+android {
+ defaultConfig {
+ manifestPlaceholders = [ activityLabel:"defaultName"]
+ }
+ productFlavors {
+ free {
+ }
+ pro {
+ manifestPlaceholders = [ activityLabel:"proName" ]
+ }
+ }
+
+</pre>
+
+<p>Placeholder in the manifest file: </p>
+
+<pre>
+&lt;activity android:name=".MainActivity" android:label="&#36;{activityLabel}" &gt;
+</pre>
+
+<p class="note"><strong>Note:</strong> The placeholder value supports partial value injection,
+for example <code>android:authority="com.acme.&#36;{localApplicationId}.foo"</code>. </p>
+
+
+
+<h2 id="merge-prodflavorsGroups">Manifest Merging Across Product Flavor Groups</h2>
+
+<p>When using the <code>GroupableProductFlavor</code> property, the manifest merge
+priority of any manifests in the product flavor groups follows the order in which the
+product flavor groups are listed in the build file. The manifest merge process creates a single
+merged manifest for the product flavor groups based on the configured build variant. </p>
+
+<p>For example, if a build variant references the product flavors <code>x86</code>,
+<code>mdpi</code>, <code>21</code>, and <code>paid</code> from the respective product flavor
+groups <code>ABI</code>, <code>Density</code>, <code>API</code>, and <code>Prod</code>, listed
+in this order in the <code>build.gradle</code> file, then the manifest merge process merges the
+manifests in this priority order, which follows how the product flavors are listed in the build
+file.</p>
+
+<p>To illustrate this example, the following table shows how the product flavors are listed for
+each product flavor group. This combination of product flavors and groups defines the
+build variant. </p>
+<table>
+ <tr>
+ <th scope="col">Product Flavor Group</th>
+ <th scope="col">Product Flavor</th>
+ <tr>
+ <td>ABI</td>
+ <td>x86</td>
+ </tr>
+ <tr>
+ <td>density</td>
+ <td>mdpi</td>
+ </tr>
+ <tr>
+ <td>API</td>
+ <td>22</td>
+ </tr>
+ <tr>
+ <td>prod</td>
+ <td>paid</td>
+ </tr>
+</table>
+
+<p>Manifest merge order:</p>
+
+ <ul>
+ <li>prod-paid AndroidManifest.xml (lowest priority) merges into API-22 AndroidManifest.xml</li>
+ <li>API-22 AndroidManifest.xml merges into density-mpi AndroidManifest.xml</li>
+ <li>density-mpi AndroidManifest.xml merges into ABI-x86 AndroidManifest.xml (highest priority)</li>
+ </ul>
+
+
+<h2 id="implicit-permissions">Implicit Permissions</h2>
+<p>Importing a library that targets an Android runtime with implicitly
+granted permissions may automatically add the permissions to the resulting merged manifest.
+For example, if an application with a <code>targetSdkVersion</code> of 16 imports a library with a
+<code>targetSdkVersion</code> of 2, Android Studio adds the <code>WRITE_EXTERNAL_STORAGE</code>
+permission to ensure permission compatibility across the SDK versions.
+
+<p class="note"><strong>Note:</strong> More recent Android releases replace implicit
+permissions with permission declarations.</p>
+
+
+This table lists the importing library versions and the declared permissions.
+</p>
+
+ <table>
+ <tr>
+ <th>Importing this library version</th>
+ <th>Declares this permission in the manifest </th>
+ </tr>
+ <tr>
+ <td><code>targetSdkVersion</code> &lt; 2 </td>
+ <td><code>WRITE_EXTERNAL_STORAGE</code> </td>
+ </tr>
+ <tr>
+ <td><code>targetSdkVersion</code> &lt; 4 </td>
+ <td><code>WRITE_EXTERNAL_STORAGE</code>, <code>READ_PHONE_STATE</code> </td>
+ </tr>
+ <tr>
+ <td>Declared <code>WRITE_EXTERNAL_STORAGE</code></td>
+ <td><code>READ_EXTERNAL_STORAGE</code></td>
+ </tr>
+ <tr>
+ <td><code>targetSdkVersion</code> &lt; 16 and using the <code>READ_CONTACTS</code>
+ permission</td>
+ <td><code>READ_CALL_LOG</code></td>
+ </tr>
+ <tr>
+ <td><code>targetSdkVersion</code> &lt; 16 and using the <code>WRITE_CONTACTS</code>
+ permission</td>
+ <td><code>WRITE_CALL_LOG</code></td>
+ </tr>
+ </table>
+
+
+
+<h2 id="merge-errors">Handling Manifest Merge Build Errors</h2>
+<p>During the build process, the manifest merge process stores a record of each merge transaction
+in the <code>manifest-merger-&lt;productFlavor&gt;-report.txt</code> file in the module
+<code>build/outputs/logs</code> folder. A different log file is generated for each of the
+module's build variants. </p>
+
+<p>When a manifest merge build error occurs, the merge process records the error message
+describing the merge conflict in the log file. For example, the
+<code>android:screenOrientation</code> merge conflict between the following manifests causes
+a build error. </p>
+
+<p>Higher priority manifest declaration: </p>
+
+<pre>
+&lt;activity
+ android:name="com.foo.bar.ActivityOne"
+ android:screenOrientation="portrait"
+ android:theme="&#64;theme1"/&gt;
+</pre>
+
+<p>Lower priority manifest declaration: </p>
+
+<pre>
+&lt;activity
+ android:name="com.foo.bar.ActivityOne"
+ android:screenOrientation="landscape"/&gt;
+</pre>
+
+<p>Error log:</p>
+
+<pre>
+/project/app/src/main/AndroidManifest.xml:3:9 Error:
+ Attribute activity&#64;screenOrientation value=(portrait) from AndroidManifest.xml:3:9
+ is also present at flavorlib:lib1:unspecified:3:18 value=(landscape)
+ Suggestion: add 'tools:replace="icon"' to <activity> element at AndroidManifest.xml:1:5 to override
+</pre>
+
+
diff --git a/docs/html/tools/help/adt.jd b/docs/html/tools/help/adt.jd
index 8abe1b4..0fac62d 100644
--- a/docs/html/tools/help/adt.jd
+++ b/docs/html/tools/help/adt.jd
@@ -30,20 +30,21 @@ page.tags=adt
</div>
</div>
- <p>ADT (Android Developer Tools) is a plugin for Eclipse that provides a suite of
+<p class="caution">
+ <strong>Important:</strong> Support for the Android Developer Tools (ADT) in Eclipse is ending,
+ per our <a href=
+ "http://android-developers.blogspot.com/2015/06/an-update-on-eclipse-android-developer.html"
+ class="external-link">announcement</a>. You should migrate your app development projects to
+ Android Studio as soon as possible. For more information on transitioning to Android Studio, see
+ <a href="{@docRoot}sdk/installing/migrate.html">Migrating to Android Studio</a>.
+</p>
+
+ <p>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.</p>
-<p class="note"><strong>Note:</strong>
-If you have been using Eclipse with ADT, be aware that <a
-href="{@docRoot}tools/studio/index.html">Android Studio</a> is now the official IDE
-for Android, so you should migrate to Android Studio to receive all the
-latest IDE updates. For help moving projects,
-see <a href="/sdk/installing/migrate.html">Migrating to Android
-Studio</a>.</p>
-
<p>If you still wish to use the ADT plugin for Eclipse, see
<a href="{@docRoot}sdk/installing/installing-adt.html">Installing Eclipse Plugin.</a>
</p>
diff --git a/docs/html/tools/studio/eclipse-transition-guide.jd b/docs/html/tools/studio/eclipse-transition-guide.jd
new file mode 100644
index 0000000..aaacbe3
--- /dev/null
+++ b/docs/html/tools/studio/eclipse-transition-guide.jd
@@ -0,0 +1,773 @@
+page.title=Transition Guide for Eclipse ADT
+@jd:body
+
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+ <ol>
+ <li><a href="#project-structure">Project Structure</a></li>
+ <li><a href="#manifest-settings">Manifest Settings</a></li>
+ <li><a href="#dependencies">Dependencies</a></li>
+ <li><a href="#build-process">Gradle-based Build Process</a></li>
+ <li><a href="#debug-inspect">Debugging and Code Inspections</a></li>
+ <li><a href="#resource-optimization">Resource Optimization</a></li>
+ <li><a href="#signing">App Signing</a></li>
+ <li><a href="#support-lib">Android Support Repository and Google Play services Repository</a></li>
+ <li><a href="#app-package">App Packaging</a></li>
+ <li><a href="#software-updates">Software Updates </a></li>
+ <li><a href="#version-control">Version Control</a></li>
+ </ol>
+
+ <h2>See also</h2>
+ <ol>
+ <li><a class="external-link"
+ href="http://confluence.jetbrains.com/display/IntelliJIDEA/FAQ+on+Migrating+to+IntelliJ+IDEA">
+ IntelliJ FAQ on migrating to IntelliJ IDEA</a></li>
+ <li><a class="external-link"
+ href="https://confluence.jetbrains.com/display/IntelliJIDEA/IntelliJ+IDEA+for+Eclipse+Users">
+ IntelliJ IntelliJ for Eclipse Users</a></li>
+ <li><a href="{@docRoot}tools/studio/index.html">Android Studio Overview</a> </li>
+ </ol>
+
+</div>
+</div>
+
+
+<p>This document describes the differences between Eclipse ADT and Android Studio, including project
+ structure, build system, debugging, and application packaging. This guide is intended to help you
+ transition to using Android Studio as your development environment.</p>
+
+<h2 id="project-structure">Project Structure </h2>
+<p>Eclipse provides workspaces as a common area for grouping related projects, configurations, and
+settings. In Android Studio, each instance of Android Studio contains a top-level project with one
+or more app modules. Each app module folder contains the equivalent to an Eclipse
+project, the complete source sets for that module, including {@code src/main} and
+{@code src/androidTest} directories, resources, build file, and the Android manifest. In general,
+to update and build your app you modify the files under each module's
+{@code src/main} directory for source code updates, the <code>gradle.build</code> file for
+build specification, and the files under {@code src/androidTest} directory for test case creation. </p>
+
+<p>You can also customize the view of the project files in Android Studio to focus on specific
+aspects of your app development: </p>
+
+<ul>
+ <li><em>Packages</em> </li>
+ <li><em>Project Files</em> </li>
+ <li><em>Scratches</em> </li>
+ <li><em>Problems</em> </li>
+ <li><em>Production</em> </li>
+ <li><em>Tests</em> </li>
+</ul>
+
+
+<p>The following table shows the general mapping of the Eclipse ADT project structure and file
+locations to Android Studio.</p>
+
+<p class="table-caption" id="table-project-structure-mapping">
+ <strong>Table 1.</strong> Project structure mapping.</p>
+
+<table>
+ <tr>
+ <th scope="col">Eclipse ADT</th>
+ <th scope="col">Android Studio</th>
+ </tr>
+
+ <tr>
+ <td>Workspace </td>
+ <td>Project </td>
+ </tr>
+
+ <tr>
+ <td>Project </td>
+ <td>Module </td>
+ </tr>
+
+ <tr>
+ <td>Project-specific JRE </td>
+ <td>Module JDK </td>
+ </tr>
+
+ <tr>
+ <td>Classpath variable </td>
+ <td>Path variable</td>
+ </tr>
+
+ <tr>
+ <td>Project dependency</td>
+ <td>Module dependency</td>
+ </tr>
+
+ <tr>
+ <td>Library Module</td>
+ <td>Library </td>
+ </tr>
+
+ <tr>
+ <td><code>AndroidManifest.xml</code></td>
+ <td><code>app/src/main/AndroidManifest.xml</code> </td>
+ </tr>
+ <tr>
+ <td><code>assets/</code></td>
+ <td><code>app/src/main/assets</code> </td>
+ </tr>
+ <tr>
+ <td><code>res/</code></td>
+ <td><code>app/src/main/res/</code> </td>
+ </tr>
+ <tr>
+ <td><code>src/</code></td>
+ <td><code>app/src/main/java/ </code> </td>
+ </tr>
+ <tr>
+ <td><code>tests/src/</code></td>
+ <td><code>app/src/androidTest/java/</code> </td>
+ </tr>
+
+ </table>
+
+
+
+<p>Table 2 shows Eclipse ADT and Android Studio project views. </p>
+
+<p class="table-caption" id="table2">
+ <strong>Table 2.</strong> Comparing project views.</p>
+<table>
+ <tbody><tr>
+ <th>Eclipse ADT</th>
+ <th>Android Studio Project View</th>
+ <th>Android Studio Android View</th>
+ </tr>
+ <tr>
+ <td><img src="{@docRoot}images/tools/eclipse-notepad-pre-import--structure.png"/> </td>
+ <td><img src="{@docRoot}images/tools/studio-import-project-structure-project.png"/> </td>
+ <td><img src="{@docRoot}images/tools/studio-import-project-structure-android.png"/> </td>
+ </tr>
+ </tbody>
+</table>
+
+
+<p class="note"><strong>Note:</strong> Multiple instances of Android Studio can be used to develop
+independent projects. </p>
+
+
+
+
+<h2 id="manifest-settings">Manifest Settings</h2>
+<p>Android Studio and <a href="http://www.gradle.org">Gradle</a>-based builds support
+<a href="{@docRoot}tools/building/configuring-gradle.html#workBuildVariants"> build variants</a>,
+which are combinations of <code>productFlavor</code> and <code>buildTypes</code>, to customize
+your build outputs. To support these custom builds, several elements in the
+<code>AndroidManifest.xml</code> file are now properties in the <code>defaultConfig</code> and
+<code>productFlavors</code> blocks in the <code>build.gradle</code> file. The import process
+copies these manifest settings to the properties in the <code>build.gradle</code> file.
+These properties overwrite the settings in any other manifest files as shown in table 3. </p>
+
+<p class="table-caption" id="table-manifest-gradle-settings">
+ <strong>Table 3.</strong> Manifest and Gradle property settings.</p>
+<table>
+ <tr>
+ <th scope="col">Manifest Setting</th>
+ <th scope="col">build.gradle Setting</th>
+ </tr>
+ <tr>
+ <td><code>&lt;uses-sdk</code> <br>
+ <p><code>android:minSdkVersion</code></p>
+ <p><code>android:targetSdkVersion /&gt;</code></p>
+ </td>
+ <td> <br>
+ <p><code>minSdkVersion</code></p>
+ <p><code>targetSdkVersion</code></p> </td>
+ </tr>
+ <tr>
+ <td><code>&lt;manifest</code>
+ <p>package (Required in the default manifest file.) </p>
+ <p><code>android:versionCode</code></p>
+ <p><code>android:versionName /&gt;</code></p>
+ </td>
+ <td> <br>
+ <p><code>applicationId</code> (See
+ <a href="{@docRoot}tools/studio/index.html#app-id"> Application ID
+ for Package Identification</a>)</p>
+ <p><code>versionCode</code></p>
+ <p><code>versionName</code></p> </td>
+ </tr>
+
+ </table>
+
+
+<p>Although these settings may no longer appear in the default app manifest file, they are still
+valid manifest entries and may still appear in manifests from older projects, imported projects,
+dependencies, and libraries.</p>
+
+<p>The <code>package</code> element must still be specified in the manifest file. It is used in
+your source code to refer to your <code>R</code> class and to resolve any relative activity/service
+registrations. </p>
+
+<p class="note"><strong>Note:</strong> When multiple manifests are present in your app, for
+example a library manifest and a <code>src/main/</code> manifest, the build process combines
+the manifest settings into a single merged manifest based on the manifest priority and
+manifest merge settings. For more information about the manifest merge process and merge settings,
+see
+<a href="{@docRoot}tools/building/manifest-merger.html"> Manifest Merger</a>. </p>
+
+
+<h2>Application ID for package identification </h2>
+<p>With the Android build system, the <code>applicationId</code> attribute is used to
+uniquely identify application packages for publishing. The application ID is set in the
+<code>android</code> section of the <code>build.gradle</code> file. This field is populated in the
+build file as part of the migration process. </p>
+
+<pre>
+apply plugin: &#39;com.android.application&#39;
+
+android {
+ compileSdkVersion 19
+ buildToolsVersion "19.1"
+
+ defaultConfig {
+ <strong>applicationId "com.example.my.app"</strong>
+ minSdkVersion 15
+ targetSdkVersion 19
+ versionCode 1
+ versionName "1.0"
+ }
+ ...
+</pre>
+
+<p class="note"><strong>Note:</strong> The <code>applicationId</code> is specified only in your
+<code>build.gradle</code> file, and not in the <code>AndroidManifest.xml</code> file.</p>
+
+<p><a href="{@docRoot}tools/building/configuring-gradle.html#workBuildVariants">Build variants</a>
+enable you to uniquely identify different
+packages for each product flavor and build type. The application ID in the build type setting can
+be added as a suffix to the ID specified for the product flavors. The following example adds the
+<code>.debug</code> suffix to the application ID of the <code>pro</code> and <code>free</code>
+product flavors: </p>
+
+<pre>
+productFlavors {
+ pro {
+ applicationId = &quot;com.example.my.pkg.pro&quot;
+ }
+ free {
+ applicationId = &quot;com.example.my.pkg.free&quot;
+ }
+}
+
+buildTypes {
+ debug {
+ applicationIdSuffix &quot;.debug&quot;
+ }
+}
+....
+</pre>
+
+
+
+<h2 id="dependencies">Dependencies</h2>
+<p>During the import process, Android Studio imports the current Eclipse ADT dependencies and
+downloads any project libraries as Android Studio modules. The dependency declarations are added to
+the <code>build.gradle</code> file. The declarations include a
+<a href="#scopes">dependency scope</a>, such as
+<code>compile</code>, to specify in which builds the dependency is included. </p>
+
+<p>The following example shows how to add an external library JAR dependency so it's included in
+each compile:</p>
+
+<pre>
+dependencies {
+ compile files(&#39;libs/*.jar&#39;)
+}
+
+android {
+ ...
+}
+</pre>
+
+<p class="note"><strong>Note:</strong> Android Studio supports the Android ARchive (AAR) format
+for the distribution of Android library projects as dependencies. For more information, see
+<a href="{@docRoot}tools/building/configuring-gradle.html">Configuring Gradle Builds</a>. </p>
+
+
+<p>The import process replaces any well-known source libraries, binary libraries, and JAR files
+that have known Maven coordinates with Maven dependencies, so you no longer need to
+maintain these dependencies manually. </p>
+
+<p>Android Studio enables access to Maven, JCenter, and Ivy repositories with the
+<code>repositories</code> block in the <code>build.gradle</code> as a shortcut to specifying
+the URL of the repository.
+
+<p>If there are required repositories not declared in the <code>build.gradle</code> file, first add
+the repository to the <code>repositories</code> block, and then declare the dependencies in a way
+that Maven, JCenter, or Ivy declare their artifacts. The following example shows how to add the
+Maven repository with the guava 11.0.2 dependency using the <code>mavenCentral()</code> property: </p>
+
+<pre>
+repositories {
+ mavenCentral()
+}
+
+android {
+ ...
+}
+
+dependencies {
+ compile &#39;com.google.guava:guava:11.0.2&#39;
+ instrumentationtestCompile &#39;com.squareup.fast-android:1:0.4&#39;
+}
+
+</pre>
+
+<p>The Android Studio project created during the import process can also re-use any
+dependencies on other components. These components can be external binary packages or other
+<a href="http://www.gradle.org">Gradle</a> projects. If a dependency has dependencies of its own,
+those dependencies are also included in the new Android Studio project. </p>
+
+
+<p class="note"><strong>Note:</strong> If there were references to Eclipse ADT workspace library
+files in the <code>project.properties</code> or <code>.classpath</code> files
+that were not imported from the Eclipse project, you can now add dependencies to these library files
+in the <code>build.gradle</code> file. For more information, see
+<a href="{@docRoot}tools/building/configuring-gradle.html">Configuring Gradle Builds</a>. </p>
+
+
+<h3 id="scopes">Dependency and compilation scopes </h3>
+<p>Android Studio supports compilation scopes to customize which dependencies get
+included in each build, for example assigning different dependencies to different
+<a href="{@docRoot}tools/building/configuring-gradle.html#workBuildVariants"> build variants</a>.</p>
+
+<p>This list shows the Android Studio scope names and definitions: </p>
+
+<ul>
+ <li>compile - <code>compile</code> </li>
+ <li>run time - <code>package</code></li>
+ <li>testCompile - <code>AndroidTestCompile</code></li>
+ <li>testRuntime - <code>AndroidTestRunPackage</code></li>
+ <li>buildTypeCompile - <code>buildTypeCompile</code> </li>
+ <li>productFlavorCompile - <code>productFlavorCompile</code> </li>
+</ul>
+
+<p class="note"><strong>Note:</strong> Dependencies for library projects must be added with the
+<code>compile</code> scope. </p>
+
+
+<p>With the <a href="http://www.gradle.org">Gradle</a>-based DSL, you can also add custom
+dependency scopes, such as <code>betaCompile file('libs/protobug.jar')</code> to define a beta
+build dependency. </p>
+
+<p>The scope and compilation configuration in the build file determine the
+components compiled into the app, added to the compilation classpath, and packaged in the final
+APK file. Based on the dependency and compilation scope, different compilation configurations
+can be specified to include the dependencies and classpaths, for example: </p>
+
+<ul>
+<li><code>compile</code> - for the main application. </li>
+<li><code>androidTestCompile</code> - for the test application. </li>
+<li><code>debugCompile</code> - for the debug buildType application.</li>
+<li><code>releaseCompile</code> - for the release buildType application. </li>
+</ul>
+
+<p class="note"><strong>Note:</strong> Because it’s not possible to build an APK that does not
+have an associated <code>buildType</code>, the APK built from your app is always configured with
+at least two dependency and compile configurations: <code>compile</code> and
+<code>debugCompile</code>. </p>
+
+<p>Unlike Eclipse ADT, by default Android Studio does not compile your code when there are changes.
+Use the <strong>File &gt; Settings &gt; Build, Execution, Deployment Compiler</strong> option
+to enable automatic compilation. </p>
+
+
+
+<h2 id="build-process">Gradle-based Build Process </h2>
+<p>Android Studio imports the Eclipse ADT Ant-based
+build tasks and converts the tasks to <a href="http://www.gradle.org">Gradle</a>-based build tasks.
+These new build tasks include the
+main <code>assemble</code> task and at least two outputs based on the default build types:
+a <code>debug</code> APK and a
+<code>release</code> APK. Each of these build tasks has its own Android build system anchor task
+to facilitate building them independently: </p>
+<ul>
+ <li><code>assemble</code></li>
+ <li><code>assembleDebug</code></li>
+ <li><code>assembleRelease</code></li>
+</ul>
+
+<p>In Android Studio, you can view all the supported build tasks in the
+<em>Gradle</em> project tab. </p>
+
+<p>With the <a href="http://www.gradle.org">Gradle</a>-based build system, Android Studio uses a
+<a href="http://www.gradle.org">Gradle</a> wrapper to fully integrate the
+Android Plugin for Gradle. The Android Plugin for Gradle also
+runs independent of Android Studio. This means that with Android Studio build system your build
+output is always the same, whether you build your Android apps from Android Studio, from the
+command line on your machine, or on machines where Android Studio is not installed (such as
+continuous integration servers). </p>
+
+<p>Unlike Eclipse ADT with dependent plugin and build updates, the <code>build.gradle</code>
+files allow you to customize the build settings for each Android Studio module and build variant,
+so the build versions can be set independently, and are not dependent on the Android Studio
+or build tools versions. This makes it easy to maintain and build legacy apps along with your
+current app, using build variants to generate different APKs from the same app modules, but
+built with different build versions and build chains. </p>
+
+<p>For more details about the Android Studio build system, see
+<a href="{@docRoot}sdk/installing/studio-build.html">Build System Overview</a>.</p>
+
+<h3>Using the Android Studio build system's declarative logic </h3>
+<p>In contrast with the XML statements in Ant build files, the Android build system and
+<a href="http://www.gradle.org">Gradle</a> DSL provide a declarative build language so you can
+easily extend the Gradle-based build process beyond the typical XML build tasks. For example,
+this build file shows how to define a custom function to inject a dynamic <code>versionCode</code>
+in build outputs: </p>
+
+<pre>
+def getVersionCode) {
+ def code = …
+ return code
+}
+
+android {
+ defaultConfig {
+ versionCode getVersionCode()
+ …
+ }
+}
+</pre>
+
+<p>This example shows how to append <em>debug</em> to your package and version names used in the
+<code>debug</code> build variant of your app: </p>
+
+<pre>
+android {
+ buildTypes {
+ debug {
+ packageNameSuffix ‘.debug’
+ versionNameSuffix ‘-DEBUG’
+ }
+ beta {
+ …
+ }
+ }
+}
+</pre>
+
+
+<p>You can also use the declarative DSL in the Android build system to generate custom build
+versions, for example a debuggable version of your release APK. This examples adds the
+<code>debuggable true</code> property to the <code>release</code> build type in the
+<code>build.gradle</code> file to build an identical debuggable version of the release package. </p>
+
+<pre>
+android {
+ buildTypes {
+ debugRelease.initWith(buildTypes.release)
+ debugRelease {
+ debuggable true
+ packageNameSuffix &#39;.debugrelease&#39;
+ signingConfig signingConfigs.debug
+ }
+
+ }
+ sourceSets.debugRelease.setRoot(&#39;src/release&#39;)
+}
+</pre>
+
+
+
+
+
+
+<h2 id="debug-inspect">Debugging and Code Inspections</h2>
+<p>Using code inspection tools such as <a href="{@docRoot}tools/help/lint.html">lint</a> is a
+standard part of Android development. Android Studio extends
+<a href="{@docRoot}tools/help/lint.html">lint</a> support with additional
+<a href="{@docRoot}tools/help/lint.html">lint</a> checks and supports Android
+<a href="{@docRoot}tools/debugging/annotations.html">annotations</a> that
+allow you to help detect more subtle code problems, such as null pointer exceptions and resource
+type conflicts. Annotations are added as metadata tags that you attach to variables, parameters,
+and return values to inspect method return values, passed parameters, and local variables and
+fields. </p>
+
+<p>For more information on enabling <a href="{@docRoot}tools/help/lint.html">lint</a> inspections
+and running <a href="{@docRoot}tools/help/lint.html">lint</a>,
+see <a href="{@docRoot}tools/debugging/improving-w-lint.html">Improving Your Code with lint</a>.
+For more information about using annotations, see
+<a href="{@docRoot}tools/debugging/annotations.html#annotations">Improving your Code with
+Annotations</a>. </p>
+
+<p>In addition to code inspection, Android Studio provides an integrated
+<a href="{@docRoot}tools/studio/index.html#mem-cpu">memory and CPU monitor</a> view so you
+can more easily monitor your app's performance and memory usage to track CPU usage, find
+deallocated objects, locate memory leaks, and track the amount of memory the connected device is
+using. </p>
+
+
+
+<h2 id="resource-optimization">Resource Optimization </h2>
+<p>After importing and building your app, Android Studio supports several
+<a href="http://www.gradle.org">Gradle</a>-based properties to help you minimize your app's
+resource utilization. </p>
+
+
+<h3>Resource shrinking</h3>
+<p>In Android Studio, resource shrinking enables the automatic removal of unused resources from
+your packaged app and also removes resources from library dependencies if the resources are not
+actually used by your app.</p>
+
+<p>Use the <code>shrinkResources</code> attribute in the <code>buildType</code> block in your
+<code>build.gradle</code> file to enable resource shrinking. For example, if your application is
+using <a href="{@docRoot}google/play-services/index.html">Google Play services</a>
+to access Google Drive functionality, and you are not currently using
+<a href="{@docRoot}google/play-services/plus.html">Google+ Sign In</a>, then
+this setting removes the various drawable assets for the <code>SignInButton</code> buttons. </p>
+
+<p class="note"><strong>Note:</strong> Resource shrinking works in conjunction with code shrinking
+tools, such as <a href="{@docRoot}tools/help/proguard.html">ProGuard</a>. </p>
+
+<p>To enable resource shrinking, update the <code>buildTypes</code> block in the
+<code>build.gradle</code> file to include <code>minifyEnabled true</code>,
+<code>shrinkResources true</code>, and <code>proguardFiles</code> settings as shown in the
+following example <a href="http://www.gradle.org">Gradle</a> build file.</p>
+
+<pre>
+android {
+ ...
+
+ buildTypes {
+ release {
+ minifyEnabled true
+ shrinkResources true
+ proguardFiles getDefaultProguardFile('proguard-android.txt'),
+ 'proguard-rules.pro'
+ }
+ }
+}
+</pre>
+
+
+
+<h3>Filtering language resources</h3>
+<p>Use the <code>resConfig</code> attribute in your <code>build.gradle</code> file
+to filter the locale resources included in your packaged app. This filtering can be especially
+useful when library dependencies such as <code>appcompat-v7</code> and other libraries such as
+<code>google-play-services_lib</code> are included in your app. </p>
+
+<p>The following example limits the locale resources to three language settings: <code>en</code>,
+<code>de</code>, and <code>es</code>:</p>
+
+<pre>
+apply plugin: 'android'
+
+android {
+ compileSdkVersion 22
+ buildToolsVersion "22.0.1"
+
+ defaultConfig {
+ minSdkVersion 8
+ targetSdkVersion 22
+ versionCode 1
+ versionName "1.0"
+ resConfigs "en", "de", "es" //Define the included language resources.
+ }
+...
+
+</pre>
+
+
+
+<h4>Filtering bundled resources</h4>
+<p>You can also use the <code>resConfig</code> build setting to limit the bundled resources
+in any resource folder. For example, you could also add <code>resConfigs</code>
+settings for density folders, such as <code>mdpi</code> or <code>hdpi</code> to limit the drawable
+resources that are packaged in your <code>APK</code> file. This example limits the app's
+bundled resources to medium-density (MDPI) and high-density (HDPI) resources. </p>
+
+<pre>
+android {
+ defaultConfig {
+ ...
+ resConfigs "mdpi", "hdpi"
+ }
+}
+</pre>
+
+For more information about screen and resource densities, see
+<a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a>
+and <a href="{@docRoot}training/multiscreen/screendensities.html">Supporting Different Densities</a>.
+
+
+<h3>Resource merging </h3>
+<p>With Android Studio, identical resources, such as copies of launcher and menu icons, may end up
+in different resource folders throughout your app. To reduce resource duplication and improve
+the performance of your app, Android Studio merges resources with an identical resource name, type,
+and qualifier into a single resource and passes the single, merged resource to the Android Asset
+Packaging Tool (AAPT) for distribution in the APK file. </p>
+
+<p>The resource merging process looks for identical resources in the following <code>/res/</code>
+folders: </p>
+<ul>
+ <li>AAR bundles of library project dependencies</li>
+ <li><code>src/main/</code> </li>
+ <li><code>src/<em>productFlavor</em>/</code> </li>
+ <li><code>src/<em>buildType</em>/</code> </li>
+</ul>
+
+<p>Identical resources are merged in the following low to high priority order: </p>
+<pre>
+dependencies --> src/main/ --> src/productFlavor/ --> src/buildType/
+</pre>
+
+<p>For example, if the <code>res/ic_menu.png</code> file is included in both the
+<code>src/main/res/</code> and <code>src/productFlavor/res/</code> folders, the resources are merged
+so only the file with the higher priority, in this case the <code>src/productFlavor/res/</code>
+file, is included in the APK file. </p>
+
+<p class="note"><strong>Note:</strong> Identical resources in the same source set are not merged
+and instead generate a resource merge error. This can happen if the <code>sourceSet</code> property
+in the <code>build.gradle</code> file is used to define multiple source sets, for example
+<code>src/main/res/</code> and <code>src/main/res2/</code>, and these folders contain identical
+resources. </p>
+
+
+
+
+<h2 id="signing">App Signing and ProGuard </h2>
+<p>Based on the imported Eclipse ADT app settings, Android Studio automatically sets up your app
+signing and maintains any ProGuard settings. </p>
+
+<h3>App Signing</h3>
+<p>If your app used a debug certificate in Eclipse ADT, Android Studio continues to reference that
+certificate. Otherwise, the <code>debug</code> configuration uses the Android Studio generated
+debug keystore, with a known password and a default key with a known password located in
+<code>$HOME/.android/debug.keystore</code>. The <code>debug</code> build type is set to use this
+debug <code>SigningConfig</code> automatically when you run or debug your project
+from Android Studio. </p>
+
+<p>In release mode, Android Studio applies the release certificate used in Eclipse ADT. If no
+release certificate was located during the import process, add the release signing configuration to
+the <code>build.gradle</code> file or use the <strong> Build > Generate Signed APK</strong> menu
+option to open the Generate Signed APK Wizard. For more information about signing your app, see
+<a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a>. </p>
+
+
+<h3>ProGuard</h3>
+<p>If the <a href="{@docRoot}tools/help/proguard.html">ProGuard</a> option is specified in the
+<code>project.properties</code> file in the Eclipse ADT project, Android Studio imports the
+<a href="{@docRoot}tools/help/proguard.html">ProGuard</a> files and adds the
+<a href="{@docRoot}tools/help/proguard.html">ProGuard</a> settings to the
+<code>build.gradle</code> file. <a href="{@docRoot}tools/help/proguard.html">ProGuard</a> is
+supported through the <code>minifyEnabled</code> property as shown in this example. </p>
+
+<pre>
+android {
+ buildTypes {
+ release {
+ minifyEnabled true
+ proguardFile getDefaultProguardFile(&#39;proguard-android.txt&#39;)
+ }
+ }
+
+ productFlavors {
+ flavor1 {
+ }
+ flavor2 {
+ proguardFile &#39;some-other-rules.txt&#39;
+ }
+ }
+}
+
+</pre></p>
+
+
+
+
+<h2 id="support-lib">Android Support Repository and Google Play services Repository</h2>
+<p>While Eclipse ADT uses the Android <a href="{@docRoot}tools/support-library/index.html">Support
+Library</a> and Google Play services Library, Android Studio replaces these libraries during the
+import process with the Android Support Repository and Google Repository to maintain
+compatible functionality and support new Android features. Android Studio adds these dependencies
+as Maven dependencies using the known Maven coordinates, so these dependencies do not require
+manual updates. </p>
+
+<p>In Eclipse, in order to use a
+<a href="{@docRoot}tools/support-library/index.html">Support Library</a>, you must modify your
+project's classpath dependencies within your development environment for each
+<a href="{@docRoot}tools/support-library/index.html">Support Library</a> you want to use. In
+Android Studio, you no longer need to copy library sources into your
+own projects, you can simply declare a dependency and the library is automatically downloaded and
+merged into your project. This includes automatically merging in resources, manifest entries,
+<a href="{@docRoot}tools/help/proguard.html">ProGuard</a> exclusion rules, and custom lint rules
+at build time. </p>
+
+<p>Android Studio also supports binary library Android ARchives (AARs). AARs are a library project's
+main output as a combination of compiled code (as a jar file and/or native .so files) and
+resources (manifest, res, assets). <p/>
+
+
+<h2 id="app-package">App Packaging</h2>
+<p>The Android build system introduces the use of the <code>applicationId</code> attribute to
+uniquely identify application packages for publishing. The application ID is set in the
+<code>android</code> section of the <code>build.gradle</code> file. </p>
+
+<p>The <code>applicationId</code> is specified only in your <code>build.gradle</code> file, and
+not in the
+<code>AndroidManifest.xml</code> file. The Gradle-based build system enables you
+to uniquely identify different packages for each build variant based on product flavors and build
+types. You can also add the <code>applicationIdSuffix</code> property to the build type in the
+<code>build.gradle</code> file to append an identifier, such as '.debug', to the application ID
+generated for each product flavor. </p>
+
+
+
+<h2 id="software-updates">Software Updates</h2>
+<p>Android Studio provides several levels of update and maintenance to help you keep Android Studio
+up-to-date based on your code-level preference: </p>
+
+<ul>
+ <li><strong>Canary channel</strong>: Canary builds provide bleeding edge releases and are updated
+ about weekly. These builds do get tested, but are still subject to bugs, as these are
+ early releases. This is not recommended for production.</li>
+ <li><strong>Dev channel</strong>: Dev builds are canary builds that passed initial testing and
+ usage. They are updated roughly bi-weekly or monthly.</li>
+ <li><strong>Beta channel</strong>: Beta builds provide beta-quality releases for final testing
+ and feedback before a production release.</li>
+ <li><strong>Stable channel</strong>: Stable builds provide stable, production-ready release
+ versions.</li>
+</ul>
+
+
+
+<h2 id="version-control">Version Control </h2>
+<p>Eclipse ADT supports version control through the use of plugins, such as the EGit and Subversive
+plug-ins. </p>
+
+<p>Android Studio supports a variety of version control systems (Git, GitHub, CVS, Mercurial,
+Subversion, and Google Cloud) so version control operations can continue from within Android
+Studio. </p>
+
+<p>After importing your Eclipse ADT app into Android Studio, use the
+Android Studio <em>VCS</em> menu options to enable VCS support for the desired version control
+system, create a repository, import the new files into version control, and perform other version
+control operations. </p>
+
+<p class="note"><strong>Note:</strong> You can also use the
+<strong>File &gt; Setting &gt; Version Control</strong> menu option to setup and modify the version
+control settings. </p>
+
+<h3>Files to ignore </h3>
+<p>A number of Android Studio files are typically not added to version control as these are
+temporary files or files that get overwritten with each build. These files are listed in
+an exclusion file, such as <code>.gitignore</code>, for the project and each app module.
+Typically, the following files are excluded from version control: </p>
+
+<ul>
+ <li>.gradle </li>
+ <li>/local.properties </li>
+ <li>/.idea/workspace.xml </li>
+ <li>/.idea/libraries </li>
+ <li>.DS_Store</li>
+ <li>/build </li>
+ <li>/captures </li>
+</ul>
diff --git a/docs/html/tools/studio/index.jd b/docs/html/tools/studio/index.jd
index 0346404..5041b83 100644
--- a/docs/html/tools/studio/index.jd
+++ b/docs/html/tools/studio/index.jd
@@ -12,9 +12,6 @@ page.tags=studio,sdk,tools,firstapp
<li><a href="#project-structure">Project and File Structure</a></li>
<li><a href="#build-system">Android Build System</a></li>
<li><a href="#debug-perf">Debug and Performance</a></li>
- <li><a href="#install-updates">Installation, Setup, and Update Management</a></li>
- <li><a href="#proxy">HTTP Proxy Settings</a></li>
- <li><a href="#other">Other Highlights</a></li>
</ol>
@@ -46,7 +43,6 @@ Android Studio offers:</p>
<li>And much more</li>
</ul>
-<p><b><a href="{@docRoot}sdk/index.html">Download Android Studio now</a></b>. </p>
<p>If you're new to Android Studio or the IntelliJ IDEA interface, this
page provides an introduction to some key Android
@@ -141,22 +137,7 @@ and <a href="{@docRoot}tools/projects/index.html">Managing Projects</a>.</p>
-<h3>Creating new files</h3>
-<p>You can quickly add new code and resource files by clicking the appropriate directory in the
-<strong>Project</strong> pane and pressing <code>ALT + INSERT</code> on Windows and Linux or
-<code>COMMAND + N</code> on Mac. Based on the type of directory selected, Android Studio
-offers to create the appropriate file type.</p>
-
-<p>For example, if you select a layout directory, press <code>ALT + INSERT</code> on Windows,
-and select <strong>Layout resource file</strong>, a dialog opens so you can name the file
-(you can exclude the {@code .xml} suffix) and choose a root view element. The editor then
-switches to the layout design editor so you can begin designing your layout.</p>
-
-
-
<h2 id="build-system">Android Build System</h2>
-
-<h3>Android Build System</h3>
<p>The Android build system is the toolkit you use to build, test, run and package
your apps. This build system replaces the Ant system used with Eclipse ADT. It can run as an
integrated tool from the Android Studio menu and independently from the command line. You can use
@@ -176,76 +157,11 @@ To configure custom build settings in an Android Studio project, see
<a href="{@docRoot}tools/building/configuring-gradle.html">Configuring Gradle Builds</a>.</p>
-<h3>Application ID for package identification </h3>
-<p>With the Android build system, the <em>applicationId</em> attribute is used to
-uniquely identify application packages for publishing. The application ID is set in the
-<em>android</em> section of the <code>build.gradle</code> file.
-</p>
-
- <pre>
- apply plugin: 'com.android.application'
-
- android {
- compileSdkVersion 19
- buildToolsVersion "19.1"
-
- defaultConfig {
- <strong>applicationId "com.example.my.app"</strong>
- minSdkVersion 15
- targetSdkVersion 19
- versionCode 1
- versionName "1.0"
- }
- ...
- </pre>
-
-<p class="note"><strong>Note:</strong> The <em>applicationId</em> is specified only in your
-{@code build.gradle} file, and not in the AndroidManifest.xml file.</p>
-
-<p>When using build variants, the build system enables you to uniquely identify different
-packages for each product flavors and build types. The application ID in the build type is added as
-a suffix to those specified for the product flavors. </p>
-
- <pre>
- productFlavors {
- pro {
- applicationId = "com.example.my.pkg.pro"
- }
- free {
- applicationId = "com.example.my.pkg.free"
- }
- }
-
- buildTypes {
- debug {
- applicationIdSuffix ".debug"
- }
- }
- ....
- </pre>
-
-<p>The package name must still be specified in the manifest file. It is used in your source code
-to refer to your R class and to resolve any relative activity/service registrations. </p>
-
- <pre>
- <?xml version="1.0" encoding="utf-8"?>
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
- <strong>package="com.example.app"</strong>>
- </pre>
-
-<p class="note"><strong>Note:</strong> If you have multiple manifests (for example, a product
-flavor specific manifest and a build type manifest), the package name is optional in those manifests.
-If it is specified in those manifests, the package name must be identical to the package name
-specified in the manifest in the <code>src/main/</code> folder. </p>
-
-<p>For more information about the build files and process, see
-<a href="{@docRoot}sdk/installing/studio-build.html">Build System Overview</a>.</p>
-
-
-
<h2 id="debug-perf">Debug and Performance</h2>
-
+<p>Android Studio provides a number of improvements to assist you in debugging and improving the
+performance of your code, including an improved virtual device management, inline debugging, and
+performance analysis tools.</p>
<h3>Android Virtual Device (AVD) Manager</h3>
<p>AVD Manager has updated screens with links to help you select the most popular device
@@ -350,7 +266,8 @@ android {
<p>You can also manage inspection profiles and configure inspections within Android Studio.
-Choose <strong>File &gt; Settings &gt; Project Settings</strong> and expand <strong>Editor</strong>.
+Choose <strong>File &gt; Settings &gt;</strong>, expand the <strong>Editor</strong> options,
+and select <strong>Inspections</strong>.
The <em>Inspection Configuration</em> page appears with the supported inspections.</p>
<p><img src="{@docRoot}images/tools/studio-inspections-config.png" alt="" /> </p>
<p class="img-caption"><strong>Figure 5.</strong> Configure inspections.</p>
@@ -506,7 +423,7 @@ the device display. </p>
<h3>Log messages</h3>
<p>When you build and run your app with Android Studio, you can view adb and device log messages
-(logcat) in the DDMS pane by clicking <strong>Android</strong> at the bottom of the window.</p>
+(logcat) by clicking <strong>Android</strong> at the bottom of the window.</p>
<p>If you want to debug your app with the
<a href="{@docRoot}tools/help/monitor.html">Android Debug Monitor</a>, you can launch it by
@@ -520,232 +437,4 @@ controlling device behaviors, and more. It also includes the Hierarchy Viewer to
-<h2 id="install-updates">Installation, Setup, and Update Management</h2>
-
-<h3>Android Studio installation and setup wizards</h3>
-<p>When you begin the installation process, an installation and setup wizard walks you through
-a step-by-step installation and setup process as the wizard checks for system requirements,
-such as the Java Development Kit (JDK) and available RAM, and then prompts for optional
-installation options, such as the Intel&#174; HAXM emulator accelerator.</p>
-
-<p>During the installation process, a setup wizard walks you through the setup processes as
-the wizard updates your system image and emulation requirements, such GPU, and then creates
-an optimized default Android Virtual Device (AVD) based on Android 5 (Lollipop) for speedy and
-reliable emulation. </p>
-<p><img src="{@docRoot}images/tools/studio-setup-wizard.png" /></p>
-<p class="img-caption"><strong>Figure 9.</strong> Installation and setup wizard.</p>
-
-
-<h3>Expanded template and form factor support</h3>
-<p>Android Studio supports templates for Google Services and expands the available device
-types. </p>
-
- <h4> Android Wear and TV support</h4>
- <p>For easy cross-platform development, the Project Wizard provides templates for
- creating your apps for Android Wear and TV. </p>
- <p><img src="{@docRoot}images/tools/studio-tvwearsupport.png" />
-
- <p class="img-caption"><strong>Figure 10.</strong> Supported form factors.</p>
- <p>During app creation, the Project Wizard also displays an API Level dialog to help you choose
- the best <em>minSdkVersion</em> for your project.</p>
-
-
- <h4> Google App Engine integration (Google Cloud Platform/Messaging)</h4>
- <p>Quick cloud integration. Using Google App Engine to connect to the Google cloud
- and create a cloud end-point is as easy as selecting <em>File > New Module > App Engine Java
- Servlet Module</em> and specifying the module, package, and client names. </p>
- <p><img src="{@docRoot}images/tools/studio-cloudmodule.png" /></p>
- <p class="img-caption"><strong>Figure 11.</strong> Google App Engine integration.</p>
-
-
-<h3>Easy access to project and file settings</h3>
-<p>Android Studio provides setting dialogs so you can manage the most important project and file
-settings from the <strong>File</strong> menus as well as the build and configuration files. For
-example, you can use the <strong>File &gt; Project Structure</strong> menu or
-the <code>build.gradle</code> file to update your <code>productFlavor</code> settings.
-Additional settings from the <strong>File</strong> menus include:
-<ul>
- <li>SDK and JDK location </li>
- <li>SDK version </li>
- <li>Gradle and Android Plugin for Gradle versions </li>
- <li>Build tools version </li>
- <li>Multidex setting</li>
- <li>Product flavors </li>
- <li>Build types </li>
- <li>Dependencies </li>
-</ul>
-</p>
-
-
-
-<h3>Update channels</h3>
-<p>Android Studio provides four update channels to keep Android Studio up-to-date based on your
-code-level preference:
-<ul>
- <li><strong>Canary channel</strong>: Canary builds provide bleeding edge releases, updated
- about weekly. While these builds do get tested, they are still subject to bugs, as we want
- people to see what's new as soon as possible. This is not recommended for production.</li>
- <li><strong>Dev channel</strong>: Dev builds are hand-picked older canary builds that survived
- the test of time. They are updated roughly bi-weekly or monthly.</li>
- <li><strong>Beta channel</strong>: Beta builds are used for beta-quality releases before a
- production release.</li>
- <li><strong>Stable channel</strong>: Used for stable, production-ready versions.</li>
-</ul>
-</p>
-
-<p>By default, Android Studio uses the <em>Stable</em> channel. Use
-<strong>File > Settings > Updates</strong> to change your channel setting. </p>
-
-
-
-<h2 id="proxy">Proxy Settings</h2>
-<p>Proxies serve as intermediary connection points between HTTP clients and web servers that add
-security and privacy to internet connections.</p>
-
-<p>To support running Android Studio behind a firewall, set the proxy settings for the
-Android Studio IDE and the SDK Manager. Use the Android Studio IDE HTTP Proxy settings page to set
-the HTTP proxy settings for Android Studio. The SDK Manager has a separate HTTP Proxy settings
-page.</p>
-
-<p>When running the Android Plugin for Gradle from the command line or on machines where
-Android Studio is not installed, such as continuous integration servers, set the proxy settings
-in the Gradle build file.</p>
-
-<p class="note"><strong>Note:</strong> After the initial installation of the Android Studio bundle,
-Android Studio can run with internet access or off-line. However, Android Studio requires an
-internet connection for Setup Wizard synchronization, 3rd-party library access, access to remote
-repositories, Gradle initialization and synchronization, and Android Studio version updates.</p>
-
-
-<h3>Setting up the Android Studio Proxy</h3>
-<p>Android Studio supports HTTP proxy settings so you can run Android Studio behind a firewall or
-secure network. To set the HTTP proxy settings in Android Studio:</p>
-<ol>
- <li>From the main menu choose <strong>File &gt; Settings &gt; Appearance & Behavior -- System
- Settings -- HTTP Proxy</strong>.
-
-<li>In Android Studio, open the IDE Settings dialog.
- <ul>
- <li>On Windows and Linux, choose
- <strong>File &gt; Settings &gt; IDE Setting -- HTTP Proxy</strong>. </li>
- <li>On Mac, choose
- <strong>Android Studio &gt; Preferences &gt; IDE Setting -- HTTP Proxy</strong>. </li>
- </ul>
- The HTTP Proxy page appears.</li>
- <li>Select <strong>auto-detection</strong> to use an auto-configuration URL to configure the
- proxy settings or <strong>manual</strong> to enter each of the settings. For a detailed explanation
- of these settings, see
- <a href="https://www.jetbrains.com/idea/help/http-proxy.html">HTTP Proxy</a>. </li>
- <li>Click <strong>Apply</strong> to enable the proxy settings. </li>
-</ol>
-
-<h3>Android Plugin for Gradle HTTP proxy settings</h3>
-When running the Android Plugin from the command line or on machines where Android Studio is not
-installed, set the Android Plugin for Gradle proxy settings in the Gradle build file.</p>
-
-<p>For application-specific HTTP proxy settings, set the proxy settings in the
-{@code build.gradle} file as required for each application module.</p>
-<pre>
-apply plugin: 'com.android.application'
-
-android {
- ...
-
- defaultConfig {
- ...
- systemProp.http.proxyHost=proxy.company.com
- systemProp.http.proxyPort=443
- systemProp.http.proxyUser=userid
- systemProp.http.proxyPassword=password
- systemProp.http.auth.ntlm.domain=domain
- }
- ...
-}
-</pre>
-
-
-
-<p>For project-wide HTTP proxy settings, set the proxy settings in the
-<code>gradle/gradle.properties</code> file. </p>
-
-<pre>
-# Project-wide Gradle settings.
-...
-
-systemProp.http.proxyHost=proxy.company.com
-systemProp.http.proxyPort=443
-systemProp.http.proxyUser=username
-systemProp.http.proxyPassword=password
-systemProp.http.auth.ntlm.domain=domain
-
-systemProp.https.proxyHost=proxy.company.com
-systemProp.https.proxyPort=443
-systemProp.https.proxyUser=username
-systemProp.https.proxyPassword=password
-systemProp.https.auth.ntlm.domain=domain
-
-...
-</pre>
-
-
-<p>For information about using Gradle properties for proxy settings, see the
- <a href="http://www.gradle.org/docs/current/userguide/build_environment.html">Gradle User Guide</a>.</p>
-
-<p class="note"><strong>Note:</strong> When using Android Studio, the settings in the Android
-Studio IDE HTTP proxy settings page override the HTTP proxy settings in the
-<strong>gradle.properties</strong> file.</p>
-
-
-
-<h3>SDK Manager HTTP Proxy Settings </h3>
-<p>SDK Manager proxy settings enable proxy internet access for Android package and library
-updates from SDK Manager packages. </p>
-
-<p>To set the SDK Manager settings for proxy internet access, start the SDK Manager and open the
-SDK Manager page. </p>
-
-<ul>
- <li>On Windows, select <strong>Tools &gt; Options</strong> from the menu bar. </li>
- <li>On Mac and Linux, choose <strong>Tools &gt; Options</strong> from the system menu bar. </li>
- </ul>
-
-<p>The Android SDK Manager page appears. Enter the settings and click <strong>Apply</strong>. </p>
-
-
-
-<h2 id="other">Other Highlights</h2>
-
-<h3 id="trans-editor"> Translations Editor</h3>
-<p>Multi-language support is enhanced with the Translations Editor plugin so you can easily add
-a variety of locales to the app's translation file. With
-<a href="https://tools.ietf.org/html/bcp47">BCP 47</a> support, the editor combines language and
-region codes into a single selection for targeted localizations. Color codes indicate whether a
-locale is complete or still missing string translations. </p>
-
-<p>To access the Translations Editor, open a <code>strings.xml</code> file and click the
-<strong>Open Editor</strong> link. </p>
-
- <img src="{@docRoot}images/tools/studio-translationeditoropen.png" />
- <p class="img-caption"><strong>Figure 12.</strong> Add locales and strings in the
- Translations Editor.</p>
-
-
-<h3> Editor support for the latest Android APIs</h3>
-<p>Android Studio supports the
-<a href="{@docRoot}design/material/index.html">Material Design</a></li> themes, widgets, and
-graphics, such as shadow layers and API version rendering (showing the layout across different
-UI versions). Also, the drawable XML tags and attributes, such as <code>&lt;ripple&gt;</code>
-and <code>&lt;animated-selector&gt;</code>, are supported.</p>
-
-
-<h3 id="git-samples"> Easy access to Android code samples on GitHub</h3>
-<p>Clicking <strong>Import Samples</strong> from the <strong>File</strong> menu or <em>Welcome</em>
-page provides seamless access to Google code samples on GitHub.</p>
- <p><img src="{@docRoot}images/tools/studio-samples-githubaccess.png" /></p>
- <p class="img-caption"><strong>Figure 13.</strong> Get code samples from GitHub.</p>
-
-
- <p><img src="{@docRoot}images/tools/studio-sample-in-editor.png" /></p>
- <p class="img-caption"><strong>Figure 14.</strong> Imported code sample.</p>
-
diff --git a/docs/html/tools/studio/studio-config.jd b/docs/html/tools/studio/studio-config.jd
new file mode 100644
index 0000000..f9646b8
--- /dev/null
+++ b/docs/html/tools/studio/studio-config.jd
@@ -0,0 +1,174 @@
+page.title=Configuration
+page.metaDescription=Learn about the Android Studio configuration.
+page.tags=studio, configuration
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#update-channel">Update Channels</a></li>
+ <li><a href="#proxy">Proxy Settings</a></li>
+ </ol>
+
+ <h2>See also</h2>
+ <ol>
+ <li><a href="{@docRoot}sdk/installing/index.html?pkg=studio">Installing Android Studio</a></li>
+ <li><a href="{@docRoot}tools/workflow/index.html">Workflow</a></li>
+ <li><a href="{@docRoot}sdk/installing/studio-features.html">Build System</a></li>
+ </ol>
+
+</div>
+</div>
+
+
+<p>During installation, Android Studio provides wizards and templates that verify your system
+requirements, such as the Java Development Kit (JDK) and available RAM, and configure default
+settings, such as an optimized default Android Virtual Device (AVD) emulation and updated system
+images. This document describes additional configuration settings you may want to use to
+customize your use of Android Studio. </p>
+
+<p>For specific documentation about emulator and device setup and use, see
+<a href="{@docRoot}tools/devices/index.html">Managing Virtual Devices</a>,
+<a href="{@docRoot}tools/device.html">Using Hardware Devices</a>, and
+<a href="{@docRoot}tools/extras/oem-usb.html">OEM USB Drivers</a>. </p>
+
+
+
+<h2 id="update-channel">Update channels</h2>
+<p>Android Studio provides four update channels to keep Android Studio up-to-date based on your
+code-level preference:
+<ul>
+ <li><strong>Canary channel</strong>: Canary builds provide bleeding edge releases, updated
+ about weekly. While these builds do get tested, they are still subject to bugs, as we want
+ people to see what's new as soon as possible. This is not recommended for production.</li>
+ <li><strong>Dev channel</strong>: Dev builds are hand-picked older canary builds that survived
+ the test of time. They are updated roughly bi-weekly or monthly.</li>
+ <li><strong>Beta channel</strong>: Beta builds are used for beta-quality releases before a
+ production release.</li>
+ <li><strong>Stable channel</strong>: Used for stable, production-ready versions.</li>
+</ul>
+</p>
+
+<p>By default, Android Studio uses the <em>Stable</em> channel. Use
+<strong>File > Settings > Appearance & Behavior System Settings > Updates</strong> to change your
+channel setting. </p>
+
+
+
+<h2 id="proxy">Proxy Settings</h2>
+<p>Proxies serve as intermediary connection points between HTTP clients and web servers that add
+security and privacy to internet connections.</p>
+
+<p>To support running Android Studio behind a firewall, set the proxy settings for the
+Android Studio IDE and the SDK Manager. Use the Android Studio IDE HTTP Proxy settings page to set
+the HTTP proxy settings for Android Studio. The SDK Manager has a separate HTTP Proxy settings
+page.</p>
+
+<p>When running the Android Plugin for Gradle from the command line or on machines where
+Android Studio is not installed, such as continuous integration servers, set the proxy settings
+in the Gradle build file.</p>
+
+<p class="note"><strong>Note:</strong> After the initial installation of the Android Studio bundle,
+Android Studio can run with internet access or off-line. However, Android Studio requires an
+internet connection for Setup Wizard synchronization, 3rd-party library access, access to remote
+repositories, Gradle initialization and synchronization, and Android Studio version updates.</p>
+
+
+<h3>Setting up the Android Studio Proxy</h3>
+<p>Android Studio supports HTTP proxy settings so you can run Android Studio behind a firewall or
+secure network. To set the HTTP proxy settings in Android Studio:</p>
+<ol>
+ <li>From the main menu choose <strong>File &gt; Settings &gt; Appearance & Behavior -- System
+ Settings -- HTTP Proxy</strong>.
+
+<li>In Android Studio, open the IDE Settings dialog.
+ <ul>
+ <li>On Windows and Linux, choose
+ <strong>File &gt; Settings &gt; IDE Setting -- HTTP Proxy</strong>. </li>
+ <li>On Mac, choose
+ <strong>Android Studio &gt; Preferences &gt; IDE Setting -- HTTP Proxy</strong>. </li>
+ </ul>
+ The HTTP Proxy page appears.</li>
+ <li>Select <strong>auto-detection</strong> to use an auto-configuration URL to configure the
+ proxy settings or <strong>manual</strong> to enter each of the settings. For a detailed explanation
+ of these settings, see
+ <a href="https://www.jetbrains.com/idea/help/http-proxy.html">HTTP Proxy</a>. </li>
+ <li>Click <strong>Apply</strong> to enable the proxy settings. </li>
+</ol>
+
+<h3>Android Plugin for Gradle HTTP proxy settings</h3>
+When running the Android Plugin from the command line or on machines where Android Studio is not
+installed, set the Android Plugin for Gradle proxy settings in the Gradle build file.</p>
+
+<p>For application-specific HTTP proxy settings, set the proxy settings in the
+{@code build.gradle} file as required for each application module.</p>
+<pre>
+apply plugin: 'com.android.application'
+
+android {
+ ...
+
+ defaultConfig {
+ ...
+ systemProp.http.proxyHost=proxy.company.com
+ systemProp.http.proxyPort=443
+ systemProp.http.proxyUser=userid
+ systemProp.http.proxyPassword=password
+ systemProp.http.auth.ntlm.domain=domain
+ }
+ ...
+}
+</pre>
+
+
+
+<p>For project-wide HTTP proxy settings, set the proxy settings in the
+<code>gradle/gradle.properties</code> file. </p>
+
+<pre>
+# Project-wide Gradle settings.
+...
+
+systemProp.http.proxyHost=proxy.company.com
+systemProp.http.proxyPort=443
+systemProp.http.proxyUser=username
+systemProp.http.proxyPassword=password
+systemProp.http.auth.ntlm.domain=domain
+
+systemProp.https.proxyHost=proxy.company.com
+systemProp.https.proxyPort=443
+systemProp.https.proxyUser=username
+systemProp.https.proxyPassword=password
+systemProp.https.auth.ntlm.domain=domain
+
+...
+</pre>
+
+
+<p>For information about using Gradle properties for proxy settings, see the
+ <a href="http://www.gradle.org/docs/current/userguide/build_environment.html">Gradle User Guide</a>.</p>
+
+<p class="note"><strong>Note:</strong> When using Android Studio, the settings in the Android
+Studio IDE HTTP proxy settings page override the HTTP proxy settings in the
+<strong>gradle.properties</strong> file.</p>
+
+
+
+<h3>SDK Manager HTTP Proxy Settings </h3>
+<p>SDK Manager proxy settings enable proxy internet access for Android package and library
+updates from SDK Manager packages. </p>
+
+<p>To set the SDK Manager settings for proxy internet access, start the SDK Manager and open the
+SDK Manager page. </p>
+
+<ul>
+ <li>On Windows, select <strong>Tools &gt; Options</strong> from the menu bar. </li>
+ <li>On Mac and Linux, choose <strong>Tools &gt; Options</strong> from the system menu bar. </li>
+ </ul>
+
+<p>The Android SDK Manager page appears. Enter the settings and click <strong>Apply</strong>. </p>
+
+
+
diff --git a/docs/html/tools/studio/studio-features.jd b/docs/html/tools/studio/studio-features.jd
new file mode 100644
index 0000000..76eba10
--- /dev/null
+++ b/docs/html/tools/studio/studio-features.jd
@@ -0,0 +1,123 @@
+page.title=Features
+page.metaDescription=Learn about the Android Studio features.
+page.tags=studio, features
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#trans-editor">Translations Editor</a></li>
+ <li><a href="#git-samples">Android Code Samples on GitHub</a></li>
+ <li><a href="#template-support">Expanded Template and Form Factor Support</a></li>
+ <li><a href="#project-settings">Android Studio and Project Settings</a></li>
+ <li><a href="#support-apis">Editor Support for the Latest Android APIs</a></li>
+ </ol>
+
+ <h2>See also</h2>
+ <ol>
+ <li><a href="{@docRoot}tools/workflow/index.html">Workflow</a></li>
+ <li><a href="{@docRoot}sdk/installing/studio-build.html">Build System</a></li>
+ <li><a href="{@docRoot}sdk/installing/studio-tips.html">Android Studio Tip & Tricks</a></li>
+ </ol>
+
+</div>
+</div>
+
+
+<p>If you're new to Android Studio or exploring recent updates, this
+page provides an introduction to some key Android Studio features.</p>
+
+<p>For specific Android Studio how-to documentation, see the pages in the <a href=
+"{@docRoot}tools/workflow/index.html">Workflow</a> section, such as
+<a href="{@docRoot}sdk/installing/create-project.html">Managing Projects from Android Studio</a>
+and
+<a href="{@docRoot}tools/building/building-studio.html">Building and Running from Android Studio</a>. </p>
+
+
+
+<h2 id="trans-editor">Translations Editor</h2>
+<p>Multi-language support is enhanced with the Translations Editor plugin so you can easily add
+a variety of locales to the app's translation file. With
+<a href="https://tools.ietf.org/html/bcp47">BCP 47</a> support, the editor combines language and
+region codes into a single selection for targeted localizations. Color codes indicate whether a
+locale is complete or still missing string translations. </p>
+
+<p>To access the Translations Editor, open a <code>strings.xml</code> file and click the
+<strong>Open Editor</strong> link, or click the globe icon
+(<img src="{@docRoot}images/tools/studio-globe-icon.png" style="vertical-align:bottom;margin:0;height:19px" />) in the Design layout view. </p>
+
+
+ <img src="{@docRoot}images/tools/studio-translationeditoropen.png" />
+ <p class="img-caption"><strong>Figure 1.</strong> Add locales and strings in the
+ Translations Editor.</p>
+
+
+
+<h2 id="git-samples">Android Code Samples on GitHub</h2>
+<p>Clicking <strong>Import Samples</strong> from the <strong>File</strong> menu or <em>Welcome</em>
+page provides seamless access to Google code samples on GitHub.</p>
+ <p><img src="{@docRoot}images/tools/studio-samples-githubaccess.png" /></p>
+ <p class="img-caption"><strong>Figure 2.</strong> Get code samples from GitHub.</p>
+
+
+ <p><img src="{@docRoot}images/tools/studio-sample-in-editor.png" /></p>
+ <p class="img-caption"><strong>Figure 3.</strong> Imported code sample.</p>
+
+
+
+<h2 id="template-support">Expanded Template and Form Factor Support</h2>
+<p>Android Studio supports templates for Google Services and expands the available device
+types. </p>
+
+ <h4> Android Wear and TV support</h4>
+ <p>For easy cross-platform development, the Project Wizard provides templates for
+ creating your apps for Android Wear and TV. </p>
+ <p><img src="{@docRoot}images/tools/studio-tvwearsupport.png" />
+
+ <p class="img-caption"><strong>Figure 4.</strong> Supported form factors.</p>
+ <p>During app creation, the Project Wizard also displays an API Level dialog to help you choose
+ the best <em>minSdkVersion</em> for your project.</p>
+
+
+ <h4> Google App Engine integration (Google Cloud Platform/Messaging)</h4>
+ <p>Quick cloud integration. Using Google App Engine to connect to the Google cloud
+ and create a cloud end-point is as easy as selecting <em>File > New Module > App Engine Java
+ Servlet Module</em> and specifying the module, package, and client names. </p>
+ <p><img src="{@docRoot}images/tools/studio-cloudmodule.png" /></p>
+ <p class="img-caption"><strong>Figure 5</strong> Google App Engine integration.</p>
+
+
+<h2 id="project-settings">Android Studio and Project Settings</h2>
+<p>Android Studio provides setting dialogs so you can manage the most important Android Studio and
+project settings from the <strong>File &gt; Project Structure</strong> and
+<strong>File &gt; Settings</strong> menus. For example, you can use the
+<strong>File &gt; Project Structure</strong> menu or
+the <code>build.gradle</code> file to update your <code>productFlavor</code> settings.
+Additional settings from the <strong>File &gt; Project Structure</strong> menus include:
+<ul>
+ <li>SDK and JDK location </li>
+ <li>SDK version </li>
+ <li>Gradle and Android Plugin for Gradle versions </li>
+ <li>Build tools version </li>
+ <li>Multidex setting</li>
+ <li><code>buildTypes</code> </li>
+ <li>Dependencies </li>
+</ul>
+</p>
+
+<p>Use the <strong>File &gt; Settings</strong> menu to modify the Android Studio or project
+behavior, such a UI themes, system settings, and version control. </p>
+
+
+
+<h2 id="support-apis">Editor Support for the Latest Android APIs</h2>
+<p>Android Studio supports the
+<a href="{@docRoot}design/material/index.html">Material Design</a></li> themes, widgets, and
+graphics, such as shadow layers and API version rendering (showing the layout across different
+UI versions). Also, the drawable XML tags and attributes, such as <code>&lt;ripple&gt;</code>
+and <code>&lt;animated-selector&gt;</code>, are supported.</p>
+
+
+
diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs
index a5e617d..db19d4f 100644
--- a/docs/html/tools/tools_toc.cs
+++ b/docs/html/tools/tools_toc.cs
@@ -20,6 +20,10 @@
<a href="<?cs var:toroot?>tools/studio/index.html">Android Studio</a>
</div>
<ul>
+ <li><a href="<?cs var:toroot ?>tools/studio/studio-config.html">
+ Configuration</a></li>
+ <li><a href="<?cs var:toroot ?>tools/studio/studio-features.html">
+ Features</a></li>
<li><a href="<?cs var:toroot ?>sdk/installing/studio-tips.html">
Tips and Tricks</a></li>
</ul>
@@ -151,12 +155,7 @@
<div class="nav-section-header"><a href="<?cs var:toroot ?>tools/help/index.html"><span
class="en">Tools Help</span></a></div>
<ul>
- <li class="nav-section">
- <div class="nav-section-header"><a href="<?cs var:toroot ?>tools/help/adb.html">adb</a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>tools/help/shell.html">Shell commands</a></li>
- </ul>
- </li>
+ <li><a href="<?cs var:toroot ?>tools/help/adb.html">adb</a></li>
<li><a href="<?cs var:toroot ?>tools/help/android.html">android</a></li>
<li><a href="<?cs var:toroot ?>tools/help/avd-manager.html">AVD Manager</a></li>
<li><a href="<?cs var:toroot ?>tools/help/bmgr.html">bmgr</a>
@@ -173,7 +172,6 @@ class="en">Tools Help</span></a></div>
<li><a href="<?cs var:toroot ?>tools/help/mksdcard.html">mksdcard</a></li>
<li><a href="<?cs var:toroot ?>tools/help/proguard.html" zh-cn-lang="ProGuard">ProGuard</a></li>
<li><a href="<?cs var:toroot ?>tools/help/sdk-manager.html">SDK Manager</a></li>
- <li><a href="<?cs var:toroot ?>tools/help/sqlite3.html">sqlite3</a></li>
<li><a href="<?cs var:toroot ?>tools/help/systrace.html">Systrace</a></li>
<li><a href="<?cs var:toroot ?>tools/help/gltracer.html">Tracer for OpenGL ES</a></li>
<li><a href="<?cs var:toroot ?>tools/help/traceview.html">Traceview</a></li>
@@ -195,11 +193,14 @@ class="en">Tools Help</span></a></div>
<span class="en">Configuring Gradle Builds</span></a></li>
<li><a href="<?cs var:toroot ?>tools/building/plugin-for-gradle.html">
<span class="en">Android Plugin for Gradle</span></a></li>
+ <li><a href="<?cs var:toroot ?>tools/building/manifest-merge.html">
+ <span class="en">Manifest Merging</span></a></li>
<li><a href="<?cs var:toroot ?>tools/building/multidex.html">
<span class="en">Apps Over 65K Methods</span></a></li>
</ul>
</li><!-- end of build system -->
+
<!-- Performance Tools menu-->
<li class="nav-section">
<div class="nav-section-header">
@@ -260,6 +261,7 @@ class="en">Tools Help</span></a></div>
</ul>
</li><!-- End Performance Tools menu-->
+
<!-- Testing Tools menu-->
<li class="nav-section">
@@ -357,7 +359,15 @@ class="en">Data Binding Library</span></a></div>
<span class="en">Eclipse with ADT</span></a>
</div>
<ul>
- <li><a href="<?cs var:toroot ?>sdk/installing/migrate.html">Migrating to Android Studio</a></li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>sdk/installing/migrate.html">
+ <span class="en">Migrating to Android Studio</span></a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>tools/studio/eclipse-transition-guide.html">
+ Transition Guide</span></a> </li>
+ </ul>
+ </li>
+
<li><a href="<?cs var:toroot ?>sdk/installing/installing-adt.html">
<span class="en">Installing the Eclipse Plugin</span></a></li>
<li><a href="<?cs var:toroot ?>tools/projects/projects-eclipse.html">Managing Projects</a></li>
diff --git a/docs/html/tools/workflow/index.jd b/docs/html/tools/workflow/index.jd
index a24a2b0..b32fa26 100644
--- a/docs/html/tools/workflow/index.jd
+++ b/docs/html/tools/workflow/index.jd
@@ -41,16 +41,16 @@ figure 1. The development steps encompass four development phases, which include
<a href="{@docRoot}tools/projects/index.html">Create an Android project</a>.</p>
</li>
<li><strong>Building, Debugging and Testing</strong>
- <p>During this phase you build your project into a debuggable <code>.apk</code> package(s)
- that you 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
+ <p>During this phase you build your project into a debuggable <code>.apk</code> package(s)
+ that you 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, with Android Studio you debug your application using the
- <a href="{@docRoot}tools/help/monitor.html">Android Debug Monitor</a> and device log messages
- (<a href="{@docRoot}tools/help/logcat.html">logact</a>) along with the IntelliJ IDEA intelligent
+ <a href="{@docRoot}tools/help/monitor.html">Android Device Monitor</a> and device log messages
+ (<a href="{@docRoot}tools/help/logcat.html">logcat</a>) along with the IntelliJ IDEA intelligent
coding features. You can also use a JDWP-compliant debugger along with the debugging and logging
tools that are provided with the Android SDK. For more information see
<a href="{@docRoot}tools/debugging/index.html">Debug your application with the SDK debugging and logging tools</a>.</p>