smain@google.com | cf18fa6 | 2014-12-09 16:39:47 -0800 | [diff] [blame] | 1 | page.title=Android Studio Overview |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 2 | @jd:body |
| 3 | |
| 4 | <div id="qv-wrapper"> |
| 5 | <div id="qv"> |
| 6 | |
| 7 | <h2>In this document</h2> |
| 8 | <ol> |
| 9 | <li><a href="#project-structure">Project and File Structure</a></li> |
| 10 | <li><a href="#build-system">Android Build System</a></li> |
| 11 | <li><a href="#debug-perf">Debug and Performance</a></li> |
| 12 | <li><a href="#install-updates">Installation, Setup, and Update Management</a></li> |
Rich Slogar | 0726a31 | 2015-01-26 11:08:55 -0800 | [diff] [blame^] | 13 | <li><a href="#proxy">HTTP Proxy Settings</a></li> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 14 | <li><a href="#other">Other Highlights</a></li> |
| 15 | |
| 16 | |
| 17 | </ol> |
| 18 | |
| 19 | <h2>See also</h2> |
| 20 | <ol> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 21 | <li><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/FAQ+on+Migrating+to+IntelliJ+IDEA">IntelliJ FAQ on migrating to IntelliJ IDEA</a></li> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 22 | </ol> |
| 23 | |
| 24 | </div> |
| 25 | </div> |
| 26 | |
| 27 | |
smain@google.com | 35ee301 | 2014-12-08 00:41:17 -0800 | [diff] [blame] | 28 | <p>Android Studio is the official IDE for Android application development, |
| 29 | based on <a href="https://www.jetbrains.com/idea/" class="external-link" |
| 30 | target="_blank">IntelliJ IDEA</a>. |
| 31 | On top of the capabilities you expect from IntelliJ, |
| 32 | Android Studio offers:</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 33 | |
| 34 | <ul> |
| 35 | <li>Flexible Gradle-based build system</li> |
| 36 | <li>Build variants and multiple <code>apk</code> file generation</li> |
smain@google.com | 35ee301 | 2014-12-08 00:41:17 -0800 | [diff] [blame] | 37 | <li>Code templates to help you build common app features</li> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 38 | <li>Rich layout editor with support for drag and drop theme editing</li> |
| 39 | <li>Lint tools to catch performance, usability, version compatibility, and other problems</li> |
| 40 | <li>ProGuard and app-signing capabilities</li> |
| 41 | <li>Built-in support for <a |
| 42 | href="http://developers.google.com/cloud/devtools/android_studio_templates/" |
| 43 | class="external-link">Google Cloud Platform</a>, making it easy to integrate Google Cloud |
| 44 | Messaging and App Engine</li> |
smain@google.com | 35ee301 | 2014-12-08 00:41:17 -0800 | [diff] [blame] | 45 | <li>And much more</li> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 46 | </ul> |
| 47 | |
smain@google.com | 2023bec | 2014-12-08 19:18:27 -0800 | [diff] [blame] | 48 | <p><b><a href="{@docRoot}sdk/index.html">Download Android Studio now</a></b>. </p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 49 | |
smain@google.com | 35ee301 | 2014-12-08 00:41:17 -0800 | [diff] [blame] | 50 | <p>If you're new to Android Studio or the IntelliJ IDEA interface, this |
| 51 | page provides an introduction to some key Android |
| 52 | Studio features.</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 53 | |
smain@google.com | 35ee301 | 2014-12-08 00:41:17 -0800 | [diff] [blame] | 54 | <p>For specific Android Studio how-to documentation, see the pages in the <a href= |
| 55 | "{@docRoot}tools/workflow/index.html">Workflow</a> section, such as <a href= |
| 56 | "{@docRoot}tools/projects/projects-studio.html">Managing Projects from Android Studio</a> and |
| 57 | <a href="{@docRoot}tools/building/building-studio.html">Building and Running from Android |
| 58 | Studio</a>.</p> |
| 59 | |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 60 | |
| 61 | |
| 62 | |
| 63 | <h2 id="project-structure">Project and File Structure</h2> |
| 64 | |
| 65 | <h3 id="project-view"><em>Android</em> Project View</h3> |
| 66 | <p>By default, Android Studio displays your profile files in the <em>Android</em> project view. This |
| 67 | view shows a flattened version of your project's structure that provides quick access to the key |
| 68 | source files of Android projects and helps you work with the new |
| 69 | <a href="{@docRoot}sdk/installing/studio-build.html">Gradle-based build system</a>. |
| 70 | The Android project view:</p> |
| 71 | |
| 72 | <ul> |
| 73 | <li>Groups the build files for all modules at the top level of the project hierarchy.</li> |
| 74 | <li>Shows the most important source directories at the top level of the module hierarchy.</li> |
| 75 | <li>Groups all the manifest files for each module.</li> |
| 76 | <li>Shows resource files from all Gradle source sets.</li> |
| 77 | <li>Groups resource files for different locales, orientations, and screen types in a single |
| 78 | group per resource type.</li> |
| 79 | </ul> |
| 80 | |
| 81 | <img src="{@docRoot}images/tools/projectview01.png" /> |
smain@google.com | 35ee301 | 2014-12-08 00:41:17 -0800 | [diff] [blame] | 82 | <p class="img-caption"><strong>Figure 1.</strong> Show the Android project view.</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 83 | <img src="{@docRoot}images/tools/studio-projectview_scripts.png" /> |
smain@google.com | 35ee301 | 2014-12-08 00:41:17 -0800 | [diff] [blame] | 84 | <p class="img-caption"><strong>Figure 2.</strong> Project Build Files.</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 85 | |
| 86 | <p>The <em>Android</em> project view shows all the build files at the top level of the project |
| 87 | hierarchy under <strong>Gradle Scripts</strong>. Each project module appears as a folder at the |
| 88 | top level of the project hierarchy and contains these three elements at the top level:</p> |
| 89 | |
| 90 | <ul> |
| 91 | <li><code>java/</code> - Source files for the module.</li> |
| 92 | <li><code>manifests/</code> - Manifest files for the module.</li> |
| 93 | <li><code>res/</code> - Resource files for the module.</li> |
| 94 | </ul> |
| 95 | |
| 96 | <p>For example, <em>Android</em> project view groups all the instances of the |
| 97 | <code>ic_launcher.png</code> resource for different screen densities under the same element.</p> |
| 98 | |
| 99 | <p class="note"><strong>Note:</strong> The project structure on disk differs from this flattened |
| 100 | representation. To switch to back the segregated project view, select <strong>Project</strong> from |
| 101 | the <strong>Project</strong drop-down. </p> |
| 102 | |
| 103 | |
| 104 | |
| 105 | <h3>New Project and Directory Structure</h3> |
smain@google.com | 6ae492e | 2014-12-08 11:28:16 -0800 | [diff] [blame] | 106 | <p>When you use the <em>Project</em> view of a new project in Android Studio, you |
| 107 | should notice that the project structure appears different than you may be used to in Eclipse. Each |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 108 | instance of Android Studio contains a project with one or more application modules. Each |
| 109 | application module folder contains the complete source sets for that module, including |
| 110 | {@code src/main} and {@code src/androidTest} directories, resources, build |
| 111 | file and the Android manifest. For the most part, you will need to modify the files under each |
| 112 | module's {@code src/main} directory for source code updates, the gradle.build file for build |
| 113 | specification and the files under {@code src/androidTest} directory for test case creation. |
| 114 | |
| 115 | <p> <img src="{@docRoot}images/tools/studio-project-layout.png" alt="" /></p> |
| 116 | <p> <class="img-caption"><strong>Figure 3.</strong> Android Studio project structure</p> |
| 117 | |
Rich Slogar | 8866975 | 2014-12-10 10:04:26 -0800 | [diff] [blame] | 118 | <p>For more information, see |
| 119 | <a href="http://confluence.jetbrains.com/display/IntelliJIDEA/Project+Organization"class="external-link">IntelliJ project organization</a> and |
| 120 | <a href="{@docRoot}tools/projects/index.html">Managing Projects</a>.</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 121 | |
| 122 | |
| 123 | <h3>Creating new files</h3> |
| 124 | <p>You can quickly add new code and resource files by clicking the appropriate directory in the |
| 125 | <strong>Project</strong> pane and pressing <code>ALT + INSERT</code> on Windows and Linux or |
| 126 | <code>COMMAND + N</code> on Mac. Based on the type of directory selected, Android Studio |
| 127 | offers to create the appropriate file type.</p> |
| 128 | |
| 129 | <p>For example, if you select a layout directory, press <code>ALT + INSERT</code> on Windows, |
| 130 | and select <strong>Layout resource file</strong>, a dialog opens so you can name the file |
| 131 | (you can exclude the {@code .xml} suffix) and choose a root view element. The editor then |
| 132 | switches to the layout design editor so you can begin designing your layout.</p> |
| 133 | |
| 134 | |
| 135 | |
| 136 | <h2 id="build-system">Android Build System</h2> |
| 137 | |
| 138 | <h3>Android Build System</h3> |
| 139 | <p>The Android build system is the toolkit you use to build, test, run and package |
| 140 | your apps. This build system replaces the Ant system used with Eclipse ADT. It can run as an |
| 141 | integrated tool from the Android Studio menu and independently from the command line. You can use |
| 142 | the features of the build system to:</p> |
| 143 | |
| 144 | <ul> |
| 145 | <li>Customize, configure, and extend the build process.</li> |
| 146 | <li>Create multiple APKs for your app with different features using the same project and |
| 147 | modules.</li> |
| 148 | <li>Reuse code and resources across source sets.</li> |
| 149 | </ul> |
| 150 | |
| 151 | <p>The flexibility of the Android build system enables you to achieve all of this without |
| 152 | modifying your app's core source files. To build an Android Studio project, see |
| 153 | <a href="{@docRoot}tools/building/building-studio.html">Building and Running from Android Studio</a>. |
| 154 | To configure custom build settings in an Android Studio project, see |
Joe Fernandez | 3ec76e0 | 2014-12-07 21:48:05 -0800 | [diff] [blame] | 155 | <a href="{@docRoot}tools/building/configuring-gradle.html">Configuring Gradle Builds</a>.</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 156 | |
| 157 | |
| 158 | <h3>Application ID for Package Identification </h3> |
| 159 | <p>With the Android build system, the <em>applicationId</em> attribute is used to |
| 160 | uniquely identify application packages for publishing. The application ID is set in the |
| 161 | <em>android</em> section of the <code>build.gradle</code> file. |
| 162 | </p> |
| 163 | |
| 164 | <pre> |
| 165 | apply plugin: 'com.android.application' |
| 166 | |
| 167 | android { |
| 168 | compileSdkVersion 19 |
| 169 | buildToolsVersion "19.1" |
| 170 | |
| 171 | defaultConfig { |
| 172 | <strong>applicationId "com.example.my.app"</strong> |
| 173 | minSdkVersion 15 |
| 174 | targetSdkVersion 19 |
| 175 | versionCode 1 |
| 176 | versionName "1.0" |
| 177 | } |
| 178 | ... |
| 179 | </pre> |
| 180 | |
| 181 | <p class="note"><strong>Note:</strong> The <em>applicationId</em> is specified only in your |
| 182 | build.gradle file, and not in the AndroidManifest.xml file.</p> |
| 183 | |
| 184 | <p>When using build variants, the build system enables you to to uniquely identify different |
| 185 | packages for each product flavors and build types. The application ID in the build type is added as |
| 186 | a suffix to those specified for the product flavors. </p> |
| 187 | |
| 188 | <pre> |
| 189 | productFlavors { |
| 190 | pro { |
| 191 | applicationId = "com.example.my.pkg.pro" |
| 192 | } |
| 193 | free { |
| 194 | applicationId = "com.example.my.pkg.free" |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | buildTypes { |
| 199 | debug { |
| 200 | applicationIdSuffix ".debug" |
| 201 | } |
| 202 | } |
| 203 | .... |
| 204 | </pre> |
| 205 | |
| 206 | <p>The package name must still be specified in the manifest file. It is used in your source code |
| 207 | to refer to your R class and to resolve any relative activity/service registrations. </p> |
| 208 | |
| 209 | <pre> |
| 210 | <?xml version="1.0" encoding="utf-8"?> |
| 211 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
| 212 | <strong>package="com.example.app"</strong>> |
| 213 | </pre> |
| 214 | |
Rich Slogar | ee37107 | 2015-01-05 14:47:19 -0800 | [diff] [blame] | 215 | <p class="note"><strong>Note:</strong> If you have multiple manifests (for example, a product |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 216 | flavor specific manifest and a build type manifest), the package name is optional in those manifests. |
| 217 | If it is specified in those manifests, the package name must be identical to the package name |
| 218 | specified in the manifest in the <code>src/main/</code> folder. </p> |
| 219 | |
| 220 | <p>For more information about the build files and process, see |
| 221 | <a href="{@docRoot}sdk/installing/studio-build.html">Build System Overview</a>.</p> |
| 222 | |
| 223 | |
| 224 | |
| 225 | |
| 226 | <h2 id="debug-perf">Debug and Performance</h2> |
| 227 | |
| 228 | |
| 229 | <h3>Android Virtual Device (AVD) Manager</h3> |
| 230 | <p>AVD Manager has updated screens with links to help you select the most popular device |
| 231 | configurations, screen sizes and resolutions for your app previews.</p> |
| 232 | Click the <strong>Android Virtual Device Manager</strong> |
| 233 | <img src="{@docRoot}images/tools/avd-manager-studio.png" |
| 234 | style="vertical-align:bottom;margin:0;height:19px" /> in the toolbar to open it and create |
| 235 | new virtual devices for running your app in the emulator.</p> |
| 236 | |
| 237 | <p>The AVD Manager comes with emulators for Nexus 6 and Nexus 9 devices and also supports |
| 238 | creating custom Android device skins based on specific emulator properties and assigning those |
Rich Slogar | d282ba7 | 2014-12-11 10:03:19 -0800 | [diff] [blame] | 239 | skins to hardware profiles. Android Studio installs the Intel® x86 Hardware Accelerated Execution |
| 240 | Manager (HAXM) emulator accelerator and creates a default emulator for quick app prototyping.</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 241 | |
| 242 | <p>For more information, see <a href="{@docRoot}tools/devices/managing-avds.html">Managing AVDs</a>.</p> |
| 243 | |
| 244 | |
| 245 | |
| 246 | <h3> Memory Monitor</h3> |
| 247 | <p>Android Studio provides a memory monitor view so you can more easily monitor your |
| 248 | app's memory usage to find deallocated objects, locate memory leaks and track the amount of |
| 249 | memory the connected device is using. With your app running on a device or emulator, click the |
| 250 | <strong>Memory Monitor</strong> tab in the lower right corner to launch the memory monitor. </p> |
| 251 | |
| 252 | <img src="{@docRoot}images/tools/studio-memory-monitor.png" /> |
smain@google.com | 35ee301 | 2014-12-08 00:41:17 -0800 | [diff] [blame] | 253 | <p class="img-caption"><strong>Figure 4.</strong> Memory Monitor</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 254 | |
| 255 | |
| 256 | |
| 257 | <h3> New Lint inspections</h3> |
| 258 | <p>Lint has several new checks to ensure: |
| 259 | <ul> |
| 260 | <li><code> Cipher.getInstance()</code> is used with safe values</li> |
| 261 | <li>In custom Views, the associated declare-styleable for the custom view uses the same |
| 262 | base name as the class name.</li> |
| 263 | <li>Security check for fragment injection.</li> |
| 264 | <li>Where ever property assignment no longer works as expected.</li> |
| 265 | <li>Gradle plugin version is compatible with the SDK.</li> |
| 266 | <li>Right to left validation </li> |
| 267 | <li>Required API version</li> |
| 268 | <li>many others</li> |
| 269 | </ul> |
| 270 | |
| 271 | <p>Hovering over a Lint error displays the full issue explanation inline for easy error |
| 272 | resolution. There is also a helpful hyperlink at the end of the error message for additional |
| 273 | error information.</p> |
| 274 | |
| 275 | <p>With Android Studio, you can run Lint for a specific build variant, or for all build variants. |
| 276 | You can configure Lint by adding a <em>lintOptions</em> property to the Android settings in the |
| 277 | build.gradle file. </p> |
| 278 | |
| 279 | <pre> |
| 280 | android { |
| 281 | lintOptions { |
| 282 | // set to true to turn off analysis progress reporting by lint |
| 283 | quiet true |
| 284 | // if true, stop the gradle build if errors are found |
| 285 | abortOnError false |
| 286 | // if true, only report errors |
| 287 | ignoreWarnings true |
| 288 | </pre> |
| 289 | |
| 290 | <p>For more information, see |
| 291 | <a href="{@docRoot}tools/debugging/improving-w-lint.html">Improving Your Code with Lint</a>.</p> |
| 292 | |
| 293 | |
| 294 | <h3>Dynamic layout preview</h3> |
| 295 | <p>Android Studio allows you to work with layouts in both a <em>Design View</em> </p> |
| 296 | <p><img src="{@docRoot}images/tools/studio-helloworld-design.png" alt="" /> |
| 297 | </p> |
smain@google.com | 35ee301 | 2014-12-08 00:41:17 -0800 | [diff] [blame] | 298 | <p class="img-caption"><strong>Figure 5.</strong> Hello World App with Design View</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 299 | |
| 300 | <p>and a <em>Text View</em>. </p> |
| 301 | |
| 302 | <p><img src="{@docRoot}images/tools/studio-helloworld-text.png" alt="" /> |
smain@google.com | 35ee301 | 2014-12-08 00:41:17 -0800 | [diff] [blame] | 303 | <pclass="img-caption"><strong>Figure 6.</strong> Hello World App with Text View</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 304 | |
| 305 | <p>Easily select and preview layout changes for different device images, display |
| 306 | densities, UI modes, locales, and Android versions (multi-API version rendering). |
| 307 | <p><img src="{@docRoot}images/tools/studio-api-version-rendering.png" /></p> |
smain@google.com | 35ee301 | 2014-12-08 00:41:17 -0800 | [diff] [blame] | 308 | <p class="img-caption"><strong>Figure 7.</strong> API Version Rendering</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 309 | |
| 310 | |
| 311 | <p>From the Design View, you can drag and drop elements from the Palette to the Preview or |
| 312 | Component Tree. The Text View allows you to directly edit the XML settings, while previewing |
| 313 | the device display. </p> |
| 314 | |
| 315 | |
| 316 | <h3>Log messages</h3> |
| 317 | <p>When you build and run your app with Android Studio, you can view adb and device log messages |
| 318 | (logcat) in the DDMS pane by clicking <strong>Android</strong> at the bottom of the window.</p> |
| 319 | |
| 320 | <p>If you want to debug your app with the |
Rich Slogar | ee37107 | 2015-01-05 14:47:19 -0800 | [diff] [blame] | 321 | <a href="{@docRoot}tools/help/monitor.html">Android Debug Monitor</a>, you can launch it by |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 322 | clicking <strong>Monitor</strong> |
| 323 | <img src="{@docRoot}images/tools/monitor-studio.png" style="vertical-align:bottom;margin:0;height:19px"/> |
| 324 | in the toolbar. The Debug Monitor is where you can find the complete set of |
| 325 | <a href="{@docRoot}tools/debugging/ddms.html">DDMS</a> tools for profiling your app, |
| 326 | controlling device behaviors, and more. It also includes the Hierarchy Viewer tools to help |
| 327 | <a href="{@docRoot}tools/debugging/debugging-ui.html"> optimize your layouts</a>.</p> |
| 328 | |
| 329 | |
| 330 | |
| 331 | |
| 332 | <h2 id="install-updates">Installation, Setup, and Update Management</h2> |
| 333 | |
| 334 | <h3>Android Studio installation and setup wizards</h3> |
| 335 | <p>An updated installation and setup wizards walk you through a step-by-step installation |
| 336 | and setup process as the wizard checks for system requirements, such as the Java Development |
| 337 | Kit (JDK) and available RAM, and then prompts for optional installation options, such as the |
Rich Slogar | d282ba7 | 2014-12-11 10:03:19 -0800 | [diff] [blame] | 338 | Intel® HAXM emulator accelerator.</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 339 | |
| 340 | <p>An updated setup wizard walks you through the setup processes as |
| 341 | the wizard updates your system image and emulation requirements, such GPU, and then creates |
Rich Slogar | 7789f4d | 2014-12-11 16:25:17 -0800 | [diff] [blame] | 342 | an optimized default Android Virtual Device (AVD) based on Android 5 (Lollipop) for speedy and |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 343 | reliable emulation. </p> |
| 344 | <p><img src="{@docRoot}images/tools/studio-setup-wizard.png" /></p> |
smain@google.com | 35ee301 | 2014-12-08 00:41:17 -0800 | [diff] [blame] | 345 | <p class="img-caption"><strong>Figure 8.</strong> Setup Wizard</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 346 | |
| 347 | |
| 348 | <h3>Expanded template and form factor support</h3> |
Rich Slogar | ee37107 | 2015-01-05 14:47:19 -0800 | [diff] [blame] | 349 | <p>Android Studio supports new templates for Google Services and expands the available device |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 350 | types. </p> |
| 351 | |
| 352 | <h4> Android Wear and TV support</h4> |
| 353 | <p>For easy cross-platform development, the Project Wizard provides new templates for |
| 354 | creating your apps for Android Wear and TV. </p> |
| 355 | <p><img src="{@docRoot}images/tools/studio-tvwearsupport.png" /> |
smain@google.com | 35ee301 | 2014-12-08 00:41:17 -0800 | [diff] [blame] | 356 | <p class="img-caption"><strong>Figure 9.</strong> New Form Factors</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 357 | <p>During app creation, the Project Wizard also displays an API Level dialog to help you choose |
| 358 | the best <em>minSdkVersion</em> for your project.</p> |
| 359 | |
| 360 | |
| 361 | <h4> Google App Engine integration (Google Cloud Platform/Messaging)</h4> |
| 362 | <p>Quick cloud integration. Using Google App Engine to connect to the Google cloud |
| 363 | and create a cloud end-point is as easy as selecting <em>File > New Module > App Engine Java |
| 364 | Servlet Module</em> and specifying the module, package, and client names. </p> |
| 365 | <p><img src="{@docRoot}images/tools/studio-cloudmodule.png" /></p> |
smain@google.com | 35ee301 | 2014-12-08 00:41:17 -0800 | [diff] [blame] | 366 | <p class="img-caption"><strong>Figure 10.</strong> Setup Wizard</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 367 | |
| 368 | |
| 369 | |
| 370 | <h3>Update channels</h3> |
| 371 | <p>Android Studio provides four update channels to keep Android Studio up-to-date based on your |
| 372 | code-level preference: |
| 373 | <ul> |
| 374 | <li><strong>Canary channel</strong>: Canary builds provide bleeding edge releases, updated |
| 375 | about weekly. While these builds do get tested, they are still subject to bugs, as we want |
| 376 | people to see what's new as soon as possible. This is not recommended for production.</li> |
| 377 | <li><strong>Dev channel</strong>: Dev builds are hand-picked older canary builds that survived |
| 378 | the test of time. They are updated roughly bi-weekly or monthly.</li> |
| 379 | <li><strong>Beta channel</strong>: Beta builds are used for beta-quality releases before a |
| 380 | production release.</li> |
Rich Slogar | 7789f4d | 2014-12-11 16:25:17 -0800 | [diff] [blame] | 381 | <li><strong>Stable channel</strong>: Used for stable, production-ready versions.</li> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 382 | </ul> |
| 383 | </p> |
| 384 | |
| 385 | <p>By default, Android Studio uses the <em>Stable</em> channel. Use |
| 386 | <strong>File > Settings > Updates</strong> to change your channel setting. </p> |
| 387 | |
| 388 | |
| 389 | |
Rich Slogar | 0726a31 | 2015-01-26 11:08:55 -0800 | [diff] [blame^] | 390 | <h2 id="proxy">Proxy Settings</h2> |
| 391 | <p>Proxies serve as intermediary connection points between HTTP clients and web servers that add |
| 392 | security and privacy to internet connections.</p> |
| 393 | |
| 394 | <p>To support running Android Studio behind a firewall, set the proxy settings for the |
| 395 | Android Studio IDE and the SDK Manager. Use the Android Studio IDE HTTP Proxy settings page to set |
| 396 | the HTTP proxy settings for Android Studio. The SDK Manager has a separate HTTP Proxy settings |
| 397 | page.</p> |
| 398 | |
| 399 | <p>When running the Android Plugin for Gradle from the command line or on machines where |
| 400 | Android Studio is not installed, such as continuous integration servers, set the proxy settings |
| 401 | in the Gradle build file.</p> |
| 402 | |
| 403 | <p class="note"><strong>Note:</strong> After the initial installation of the Android Studio bundle, |
| 404 | Android Studio can run with internet access or off-line. However, Android Studio requires an |
| 405 | internet connection for Setup Wizard synchronization, 3rd-party library access, access to remote |
| 406 | repositories, Gradle initialization and synchronization, and Android Studio version updates.</p> |
| 407 | |
| 408 | |
| 409 | <h3>Setting up the Android Studio Proxy</h3> |
| 410 | <p>Android Studio supports HTTP proxy settings so you can run Android Studio behind a firewall or |
| 411 | secure network. To set the HTTP proxy settings in Android Studio:</p> |
| 412 | <ol> |
| 413 | <li>From the main menu choose <strong>File > Settings > IDE Setting -- HTTP Proxy</strong>. |
| 414 | |
| 415 | <li>In Android Studio, open the IDE Settings dialog. |
| 416 | <ul> |
| 417 | <li>On Windows and Linux, choose |
| 418 | <strong>File > Settings > IDE Setting -- HTTP Proxy</strong>. </li> |
| 419 | <li>On Mac, choose |
| 420 | <strong>Android Studio > Preferences > IDE Setting -- HTTP Proxy</strong>. </li> |
| 421 | </ul> |
| 422 | The HTTP Proxy page appears.</li> |
| 423 | <li>Select <strong>auto-detection</strong> to use an auto-configuration URL to configure the |
| 424 | proxy settings or <strong>manual</strong> to enter each of the settings. For a detailed explanation |
| 425 | of these settings, see |
| 426 | <a href="https://www.jetbrains.com/idea/help/http-proxy.html">HTTP Proxy</a>. </li> |
| 427 | <li>Click <strong>Apply</strong> to enable the proxy settings. </li> |
| 428 | </ol> |
| 429 | |
| 430 | <h3>Android Plugin for Gradle HTTP proxy settings</h3> |
| 431 | When running the Android Plugin from the command line or on machines where Android Studio is not |
| 432 | installed, set the Android Plugin for Gradle proxy settings in the Gradle build file.</p> |
| 433 | |
| 434 | <p>For application-specific HTTP proxy settings, set the proxy settings in the |
| 435 | <strong>build.gradle</strong> file as required for each application module.</p> |
| 436 | <pre> |
| 437 | apply plugin: 'com.android.application' |
| 438 | |
| 439 | android { |
| 440 | ... |
| 441 | |
| 442 | defaultConfig { |
| 443 | ... |
| 444 | systemProp.http.proxyHost=proxy.company.com |
| 445 | systemProp.http.proxyPort=443 |
| 446 | systemProp.http.proxyUser=userid |
| 447 | systemProp.http.proxyPassword=password |
| 448 | systemProp.http.auth.ntlm.domain=domain |
| 449 | } |
| 450 | ... |
| 451 | } |
| 452 | </pre> |
| 453 | |
| 454 | |
| 455 | |
| 456 | <p>For project-wide HTTP proxy settings, set the proxy settings in the |
| 457 | <code>gradle/gradle.properties</code> file. </p> |
| 458 | |
| 459 | <pre> |
| 460 | # Project-wide Gradle settings. |
| 461 | ... |
| 462 | |
| 463 | systemProp.http.proxyHost=proxy.company.com |
| 464 | systemProp.http.proxyPort=443 |
| 465 | systemProp.http.proxyUser=username |
| 466 | systemProp.http.proxyPassword=password |
| 467 | systemProp.http.auth.ntlm.domain=domain |
| 468 | |
| 469 | systemProp.https.proxyHost=proxy.company.com |
| 470 | systemProp.https.proxyPort=443 |
| 471 | systemProp.https.proxyUser=username |
| 472 | systemProp.https.proxyPassword=password |
| 473 | systemProp.https.auth.ntlm.domain=domain |
| 474 | |
| 475 | ... |
| 476 | </pre> |
| 477 | |
| 478 | |
| 479 | <p>For information about using Gradle properties for proxy settings, see the |
| 480 | <a href="http://www.gradle.org/docs/current/userguide/build_environment.html">Gradle User Guide</a>.</p> |
| 481 | |
| 482 | <p class="note"><strong>Note:</strong> When using Android Studio, the settings in the Android |
| 483 | Studio IDE HTTP proxy settings page override the HTTP proxy settings in the |
| 484 | <strong>gradle.properties</strong> file.</p> |
| 485 | |
| 486 | |
| 487 | |
| 488 | <h3>SDK Manager HTTP Proxy Settings </h3> |
| 489 | <p>SDK Manager proxy settings enable proxy internet access for Android package and library |
| 490 | updates from SDK Manager packages. </p> |
| 491 | |
| 492 | <p>To set the SDK Manager settings for proxy internet access, start the SDK Manager and open the |
| 493 | SDK Manager page. </p> |
| 494 | |
| 495 | <ul> |
| 496 | <li>On Windows, select <strong>Tools > Options</strong> from the menu bar. </li> |
| 497 | <li>On Mac and Linux, choose <strong>Tools > Options</strong> from the system menu bar. </li> |
| 498 | </ul> |
| 499 | |
| 500 | <p>The Android SDK Manager page appears. Enter the settings and click <strong>Apply</strong>. </p> |
| 501 | |
| 502 | |
| 503 | |
Rich Slogar | d282ba7 | 2014-12-11 10:03:19 -0800 | [diff] [blame] | 504 | <h2 id="other">Other Highlights</h2> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 505 | |
| 506 | <h3> Translation Editor</h3> |
| 507 | <p>Multi-language support is enhanced with the Translation Editor plugin so you can easily add |
| 508 | locales to the app's translation file. Color codes indicate whether a locale is complete or |
| 509 | still missing string translations. Also, you can use the plugin to export your strings to the |
| 510 | Google Play Developer Console for translation, then download and import your translations back |
| 511 | into your project. </p> |
| 512 | |
| 513 | <p>To access the Translation Editor, open a <code>strings.xml</code> file and click the |
| 514 | <strong>Open Editor</strong> link. </p> |
| 515 | |
| 516 | <img src="{@docRoot}images/tools/studio-translationeditoropen.png" /> |
smain@google.com | 35ee301 | 2014-12-08 00:41:17 -0800 | [diff] [blame] | 517 | <p class="img-caption"><strong>Figure 11.</strong> Translation Editor</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 518 | |
| 519 | |
| 520 | <h3> Editor support for the latest Android APIs</h3> |
| 521 | <p>Android Studio supports the new |
| 522 | <a href="{@docRoot}design/material/index.html">Material Design</a></li> themes, widgets, and |
| 523 | graphics, such as shadow layers and API version rendering (showing the layout across different |
| 524 | UI versions). Also, the new drawable XML tags and attributes, such as <ripple> |
| 525 | and <animated-selector>, are supported.</p> |
| 526 | |
| 527 | |
Rich Slogar | 7cc8398 | 2014-12-15 15:51:28 -0800 | [diff] [blame] | 528 | <h3 id="git-samples"> Easy access to Android code samples on GitHub</h3> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 529 | <p>Clicking <strong>Import Samples</strong> from the <strong>File</strong> menu or Welcome page |
| 530 | provides seamless access to Google code samples on GitHub.</p> |
| 531 | <p><img src="{@docRoot}images/tools/studio-samples-githubaccess.png" /></p> |
Rich Slogar | d282ba7 | 2014-12-11 10:03:19 -0800 | [diff] [blame] | 532 | <p class="img-caption"><strong>Figure 12.</strong> Code Sample Access</p> |
Rich Slogar | e3fe938 | 2014-11-20 13:49:05 -0800 | [diff] [blame] | 533 | |
Rich Slogar | 7cc8398 | 2014-12-15 15:51:28 -0800 | [diff] [blame] | 534 | |
| 535 | <p><img src="{@docRoot}images/tools/studio-sample-in-editor.png" /></p> |
| 536 | <p class="img-caption"><strong>Figure 13.</strong> Imported Code Sample</p> |
| 537 | |
| 538 | |