1page.title=Configuration
2page.metaDescription=Learn about the Android Studio configuration.
3page.tags=studio, configuration
4@jd:body
5
6<div id="qv-wrapper">
7<div id="qv">
8
9    <h2>In this document</h2>
10    <ol>
11      <li><a href="#sdk-mgr">SDK Manager</a></li>
12      <li><a href="#update-channel">Update Channels</a></li>
13      <li><a href="#proxy">Proxy Settings</a></li>
14    </ol>
15
16  <h2>See also</h2>
17  <ol>
18    <li><a href="{@docRoot}sdk/installing/index.html?pkg=studio">Installing Android Studio</a></li>
19    <li><a href="{@docRoot}tools/workflow/index.html">Workflow</a></li>
20    <li><a href="{@docRoot}sdk/installing/studio-features.html">Build System</a></li>
21  </ol>
22
23</div>
24</div>
25
26
27<p>Android Studio provides wizards and templates that verify your system
28requirements, such as the Java Development Kit (JDK) and available RAM, and configure default
29settings, such as an optimized default Android Virtual Device (AVD) emulation and updated system
30images. This document describes additional configuration settings you may want to use to
31customize your use of Android Studio. </p>
32
33<p>For specific documentation about emulator and device setup and use, see
34<a href="{@docRoot}tools/devices/index.html">Managing Virtual Devices</a>,
35<a href="{@docRoot}tools/device.html">Using Hardware Devices</a>, and
36<a href="{@docRoot}tools/extras/oem-usb.html">OEM USB Drivers</a>. </p>
37
38
39<h2 id="sdk-mgr">SDK Manager</h2>
40<p>After the initial Android Studio installation and setup, use the
41<a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a> to verify and update the tools,
42platforms, packages, and other components used by your apps. You can also use the
43<strong>File</strong> &gt; <strong>Settings</strong> &gt;
44<strong>Appearance & Behavior</strong> &gt; <strong>System Settings</strong> &gt;
45<strong>Updates</strong> to configure the SDK Manager to automatically prompt whenever updates are
46available. </p>
47
48<p class="note"><strong>Note:</strong> You can also customize the <code>build.gradle</code> file
49so each app uses a specific build chain and compilation options. For more information see,
50<a href="{@docRoot}tools/building/configuring-gradle.html">Configuring Gradle Builds</a>.   </p>
51
52
53
54<h2 id="update-channel">Update channels</h2>
55<p>Android Studio provides four update channels to keep Android Studio up-to-date based on your
56code-level preference:
57<ul>
58  <li><strong>Canary channel</strong>: Canary builds provide bleeding edge releases, updated
59  about weekly. While these builds do get tested, they are still subject to bugs, as we want
60  people to see what's new as soon as possible. This is not recommended for production.</li>
61  <li><strong>Dev channel</strong>: Dev builds are hand-picked older canary builds that survived
62  the test of time. They are updated roughly bi-weekly or monthly.</li>
63  <li><strong>Beta channel</strong>: Beta builds are used for beta-quality releases before a
64  production release.</li>
65  <li><strong>Stable channel</strong>: Used for stable, production-ready versions.</li>
66</ul>
67</p>
68
69<p>By default, Android Studio uses the <em>Stable</em> channel. Use
70<strong>File > Settings > Appearance & Behavior System Settings > Updates</strong> to change your
71channel setting. </p>
72
73
74
75<h2 id="proxy">Proxy Settings</h2>
76<p>Proxies serve as intermediary connection points between HTTP clients and web servers that add
77security and privacy to internet connections.</p>
78
79<p>To support running Android Studio behind a firewall, set the proxy settings for the
80Android Studio IDE and the SDK Manager. Use the Android Studio IDE HTTP Proxy settings page to set
81the HTTP proxy settings for Android Studio. The SDK Manager has a separate HTTP Proxy settings
82page.</p>
83
84<p>When running the Android Plugin for Gradle from the command line or on machines where
85Android Studio is not installed, such as continuous integration servers, set the proxy settings
86in the Gradle build file.</p>
87
88<p class="note"><strong>Note:</strong> After the initial installation of the Android Studio bundle,
89Android Studio can run with internet access or off-line. However, Android Studio requires an
90internet connection for Setup Wizard synchronization, 3rd-party library access, access to remote
91repositories, Gradle initialization and synchronization, and Android Studio version updates.</p>
92
93
94<h3>Setting up the Android Studio Proxy</h3>
95<p>Android Studio supports HTTP proxy settings so you can run Android Studio behind a firewall or
96secure network. To set the HTTP proxy settings in Android Studio:</p>
97<ol>
98 <li>From the main menu choose <strong>File &gt; Settings &gt; Appearance & Behavior -- System
99 Settings -- HTTP Proxy</strong>.
100
101<li>In Android Studio, open the IDE Settings dialog.
102  <ul>
103     <li>On Windows and Linux, choose
104     <strong>File &gt; Settings &gt; IDE Setting -- HTTP Proxy</strong>. </li>
105     <li>On Mac, choose
106     <strong>Android Studio &gt; Preferences &gt; IDE Setting -- HTTP Proxy</strong>. </li>
107   </ul>
108 The HTTP Proxy page appears.</li>
109 <li>Select <strong>auto-detection</strong> to use an auto-configuration URL to configure the
110 proxy settings or <strong>manual</strong> to enter each of the settings. For a detailed explanation
111 of these settings, see
112 <a href="https://www.jetbrains.com/idea/help/http-proxy.html">HTTP Proxy</a>. </li>
113 <li>Click <strong>Apply</strong> to enable the proxy settings. </li>
114</ol>
115
116<h3>Android Plugin for Gradle HTTP proxy settings</h3>
117When running the Android Plugin from the command line or on machines where Android Studio is not
118installed, set the Android Plugin for Gradle proxy settings in the Gradle build file.</p>
119
120<p>For application-specific HTTP proxy settings, set the proxy settings in the
121{@code build.gradle} file as required for each application module.</p>
122<pre>
123apply plugin: 'com.android.application'
124
125android {
126    ...
127
128    defaultConfig {
129        ...
130        systemProp.http.proxyHost=proxy.company.com
131        systemProp.http.proxyPort=443
132        systemProp.http.proxyUser=userid
133        systemProp.http.proxyPassword=password
134        systemProp.http.auth.ntlm.domain=domain
135    }
136    ...
137}
138</pre>
139
140
141
142<p>For project-wide HTTP proxy settings, set the proxy settings in the
143<code>gradle/gradle.properties</code> file. </p>
144
145<pre>
146# Project-wide Gradle settings.
147...
148
149systemProp.http.proxyHost=proxy.company.com
150systemProp.http.proxyPort=443
151systemProp.http.proxyUser=username
152systemProp.http.proxyPassword=password
153systemProp.http.auth.ntlm.domain=domain
154
155systemProp.https.proxyHost=proxy.company.com
156systemProp.https.proxyPort=443
157systemProp.https.proxyUser=username
158systemProp.https.proxyPassword=password
159systemProp.https.auth.ntlm.domain=domain
160
161...
162</pre>
163
164
165<p>For information about using Gradle properties for proxy settings, see the
166 <a href="http://www.gradle.org/docs/current/userguide/build_environment.html">Gradle User Guide</a>.</p>
167
168<p class="note"><strong>Note:</strong> When using Android Studio, the settings in the Android
169Studio IDE HTTP proxy settings page override the HTTP proxy settings in the
170<strong>gradle.properties</strong> file.</p>
171
172
173
174<h3>SDK Manager HTTP Proxy Settings </h3>
175<p>SDK Manager proxy settings enable proxy internet access for Android package and library
176updates from SDK Manager packages. </p>
177
178<p>To set the SDK Manager settings for proxy internet access, start the SDK Manager and open the
179SDK Manager page. </p>
180
181<ul>
182   <li>On Windows, select <strong>Tools &gt; Options</strong> from the menu bar. </li>
183   <li>On Mac and Linux, choose <strong>Tools &gt; Options</strong> from the system menu bar. </li>
184 </ul>
185
186<p>The Android SDK Manager page appears. Enter the settings and click <strong>Apply</strong>. </p>
187
188
189
190