diff options
Diffstat (limited to 'docs')
18 files changed, 953 insertions, 1406 deletions
diff --git a/docs/html/images/tools/studio-androidtest-folder.png b/docs/html/images/tools/studio-androidtest-folder.png Binary files differnew file mode 100644 index 0000000..6881741 --- /dev/null +++ b/docs/html/images/tools/studio-androidtest-folder.png diff --git a/docs/html/images/tools/studio-hero-code.png b/docs/html/images/tools/studio-hero-code.png Binary files differnew file mode 100644 index 0000000..e0f9e21 --- /dev/null +++ b/docs/html/images/tools/studio-hero-code.png diff --git a/docs/html/images/tools/studio-hero-code_2x.png b/docs/html/images/tools/studio-hero-code_2x.png Binary files differnew file mode 100644 index 0000000..27d527b --- /dev/null +++ b/docs/html/images/tools/studio-hero-code_2x.png diff --git a/docs/html/images/tools/studio-hero.png b/docs/html/images/tools/studio-hero.png Binary files differindex 0cbadec..24bd99d 100644 --- a/docs/html/images/tools/studio-hero.png +++ b/docs/html/images/tools/studio-hero.png diff --git a/docs/html/images/tools/studio-hero_2x.png b/docs/html/images/tools/studio-hero_2x.png Binary files differindex 0030244..ee313f3 100644 --- a/docs/html/images/tools/studio-hero_2x.png +++ b/docs/html/images/tools/studio-hero_2x.png diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd index 21256df..37d5c57 100644 --- a/docs/html/sdk/index.jd +++ b/docs/html/sdk/index.jd @@ -264,24 +264,29 @@ This is the Android Software Development Kit License Agreement + + + <div id="landing"> <div class="col-13"> </div><!-- provides top margin for content --> <img src="{@docRoot}images/tools/studio-hero.png" srcset="{@docRoot}images/tools/studio-hero_2x.png 2x, {@docRoot}images/tools/studio-hero.png 1x" -width="760" height="380" alt="" style="margin-bottom:60px" /> +width="760" height="400" alt="" style="margin-bottom:60px" /> <div style="color: #fff; width:226px; height:0; overflow:visible; position:absolute; top:40px; left:25px"> -<h1 class="studio-logo" style="margin:0 0 30px !important">Android Studio</h1> +<h1 class="studio-logo" style="margin:0 0 35px !important">Android Studio</h1> + <p style="font-size: 16px; color:#bbb; position: absolute;left: 297px; top: 5px; display: block; width: 400px;text-align: center;">The official Android IDE</p> <ul style="font-size:12px"> -<li>IntelliJ IDE Community Edition + Android Studio plugin</li> +<li>Android Studio IDE</li> <li>Android SDK tools</li> <li>Android 5.0 (Lollipop) Platform</li> +<li>Android 5.0 emulator system image with Google APIs</li> </ul> <a class="online landing-button green download-bundle-button" style="margin-top:30px;" @@ -293,15 +298,33 @@ To get Android Studio or stand-alone SDK tools, visit <a href="http://developer.android.com/sdk/index.html">developer.android.com/sdk/</a> </p> -<ul style="margin-top:70px;color:#444"> +<ul style="margin-top:50px;color:#444"> <li><a href="#Requirements">System Requirements</a></li> - <li><a href="#Other">Other SDK Downloads</a></li> - <li><a href="{@docRoot}sdk/installing/migrate.html">Migrate from Eclipse</a></li> + <li><a href="#Other">Other Download Options</a></li> + <li><a href="{@docRoot}sdk/installing/migrate.html">Migrating to Android Studio</a></li> </ul> </div> + + +<h2 class="feature norule" >Intelligent code editor</h2> + +<div class="col-9" style="margin:0 20px 0 0"> + <img src="{@docRoot}images/tools/studio-hero-code.png" +srcset="{@docRoot}images/tools/studio-hero-code_2x.png 2x, {@docRoot}images/tools/studio-hero-code.png 1x" width="520" /> +</div><!-- end col-9 (left column) --> + +<div class="col-4 feature-blurb"> + <p>At the core of Android Studio is an intelligent code editor capable of advanced + code completion, refactoring, and code analysis.</p> + <p>The powerful code editor helps you be a more productive Android app developer.</p> +</div> + + + + <h2 class="feature norule"> Android builds evolved, with Gradle</h2> @@ -318,7 +341,8 @@ srcset="{@docRoot}images/tools/studio-hero-gradle_2x.png 2x, {@docRoot}images/to -<h2 class="feature norule">Build apps for all screen types</h2> + +<h2 class="feature norule">Multi-screen app development</h2> <div class="col-9" style="margin:0 20px 0 0"> <img src="{@docRoot}images/tools/studio-hero-screens.png" @@ -333,7 +357,9 @@ srcset="{@docRoot}images/tools/studio-hero-screens_2x.png 2x, {@docRoot}images/t </div> -<h2 class="feature norule">Target and test against key devices</h2> + + +<h2 class="feature norule">Virtual devices for all shapes and sizes</h2> <div class="col-9" style="margin:0 20px 0 0"> <img src="{@docRoot}images/tools/studio-hero-avds.png" @@ -348,7 +374,9 @@ srcset="{@docRoot}images/tools/studio-hero-avds_2x.png 2x, {@docRoot}images/tool -<h2 class="feature norule">Import code from GitHub</h2> + + +<h2 class="feature norule">Code templates and GitHub integration</h2> <div class="col-9" style="margin:0 20px 0 0"> <img src="{@docRoot}images/tools/studio-hero-import.png" @@ -358,7 +386,7 @@ srcset="{@docRoot}images/tools/studio-hero-import_2x.png 2x, {@docRoot}images/to <div class="col-4 feature-blurb"> <p>New project wizards make it easier than ever to start a new project.</p> - <p>Start with common app patterns such as navigation drawer or view pagers, + <p>Start projects using template code for patterns such as navigation drawer and view pagers, and even import Google code samples from GitHub.</p> </div> @@ -373,7 +401,7 @@ style="margin:0 0 40px 60px;float:right" href="" >Download Android Studio</a> <ul> - <li>Built on IntelliJ IDEA Community Edition, the popular Java IDE by JetBrains</li> + <li>Built on IntelliJ IDEA Community Edition, the popular Java IDE by JetBrains.</li> <li>Flexible Gradle-based build system.</li> <li>Build variants and multiple APK generation.</li> <li>Expanded template support for Google Services and various device types.</li> @@ -452,6 +480,6 @@ rendering. You can then configure your project to use Java Development Kit (JDK) -<h2 id="Other" style="clear:left">Other SDK Downloads</h2> +<h2 id="Other" style="clear:left">Other Download Options</h2> <!-- alternative SDK options follows --> diff --git a/docs/html/sdk/installing/migrate.jd b/docs/html/sdk/installing/migrate.jd index fd70c48..81d6f92 100644 --- a/docs/html/sdk/installing/migrate.jd +++ b/docs/html/sdk/installing/migrate.jd @@ -14,7 +14,8 @@ page.title=Migrating to Android Studio </div> </div> -<p>To quickly start developing apps, we recommend you migrate to Android Studio, a new Android +<p>If you're currently using Eclipse with ADT, we recommend you migrate to <a +href={@docRoot}tools/basics/index.html">Android Studio</a>, a new Android development environment powered by IntelliJ IDEA. On top of the capabilities you expect from IntelliJ, Android Studio offers:</p> <ul> @@ -28,18 +29,33 @@ IntelliJ, Android Studio offers:</p> href="https://developers.google.com/cloud/devtools/android_studio_templates/" class="external-link">Google Cloud Platform</a>, making it easy to integrate Google Cloud Messaging and App Engine.</li> - <li>And much more.</li> + <li>And <a href="{@docRoot}tools/studio/index.html">much more</a>.</li> </ul> -<p>If you've previously developed for Android using Eclipse and would like to migrate +<p>To migrate existing Android projects from Eclipse, +you should export your projects from Eclipse in order to generate +Gradle build files:</p> -to Android Studio, you should export your projects from Eclipse in order to generate -Gradle build files. You can then import your project into Android Studio.</p> +<ol> + <li>In Eclipse, select <strong>File > Export</strong>.</li> + <li>Select <strong>Generate Gradle build files</strong> inside the Android folder, then click + <strong>Next</strong>.</li> + <li>Click <strong>Browse</strong> to find your project to export.</li> + <li>Select your project from the list, click <strong>OK</strong>, then <strong>Finish</strong>.</li> +</ol> -<p>Now that your project is imported to Android Studio, -read <a href="{@docRoot}tools/basics/index.html">Android Studio Basics</a> for some -help getting started.</p> +<p>You can then import the project into Android Studio:</p> + +<ol> + <li>In Android Studio, close any projects currently open. You should see the + <strong>Welcome to Android Studio</strong> window.</li> + <li>Click <strong>Import Project</strong>.</li> + <li>Locate the project you exported from Eclipse, expand it, select the + <strong>build.gradle</strong> file and click <strong>OK</strong>.</li> + <li>In the following dialog, leave <strong>Use gradle wrapper</strong> selected and click + <strong>OK</strong>. (You do not need to specify the Gradle home.)</li> +</ol> <p>It's possible to import an existing Android project to Android Studio even if you don't generate a Gradle build file from Eclipse—Android Studio will successfully build and diff --git a/docs/html/sdk/installing/studio-tips.jd b/docs/html/sdk/installing/studio-tips.jd index 03e29ca..8a1d79e 100644 --- a/docs/html/sdk/installing/studio-tips.jd +++ b/docs/html/sdk/installing/studio-tips.jd @@ -1,142 +1,170 @@ page.title=Android Studio Tips and Tricks - @jd:body <div id="qv-wrapper"> <div id="qv"> -<h2>See also</h2> -<ul> - <li><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/Working+in+Eclipse+Compatibility+Mode" class="external-link" - >Eclipse Compatibility Mode</a></li> - <li><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/FAQ+on+Migrating+to+IntelliJ+IDEA" class="external-link" - >FAQ on Migrating</a></li> - <li><a href="http://android-developers.blogspot.com/2013/06/adding-backend-to-your-app-in-android.html" - class="external-link">Adding a Backend to Your App In Android Studio</a></li> -</ul> + + <h2>See also</h2> + <ol> + <li><a href="{@docRoot}tools/sdk/index.html">Download Android Studio</a></li> + <li><a href="http://wiki.jetbrains.net/intellij/Android">IntelliJ IDEA Android Tutorials</a></li> + <li><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/FAQ+on+Migrating+to+IntelliJ+IDEA">IntelliJ FAQ on migrating to IntelliJ IDEA</a></li> + </ol> + </div> </div> -<p>If you're unfamiliar with the IntelliJ IDEA interface, you might be wondering -how to accomplish some common tasks in Android Studio. This page provides some tips -to help you get going.</p> +<p>If you're unfamiliar with using Android Studio and the IntelliJ IDEA interface, this page +provides some tips to help you get started with some of the most common tasks and productivity +enhancements. </p> -<p>For complete user documentation for the IntelliJ IDEA interface -(upon which Android Studio is based), refer to the -<a href="http://www.jetbrains.com/idea/index.html">IntelliJ IDEA documentation</a>.</p> -<div class="figure" style="width:200px"> - <img src="{@docRoot}images/tools/project-layout.png" alt="" /> - <p class="img-caption"><strong>Figure 1.</strong> Gradle project structure</p> -</div> + <h2>Smart Rendering</h2> + <p>With smart rendering, Android Studio displays links for quick fixes to rendering errors. + For example, if you add a button to the layout without specifying the <em>width</em> and + <em>height</em> atttributes, Android Studio displays the rendering message <em>Automatically + add all missing attributs</em>. Clicking the message adds the missing attributes to the layout.</p> -<h2 id="Project">Project Structure</h2> -<p>When you create a new project in Android Studio (or -<a href="{@docRoot}sdk/installing/migrate.html">migrate a project from Eclipse</a>), -you'll notice that the project structure appears differently than you may be used to. -As shown in figure 1, almost all your project files are now inside the {@code src/} directory, -including resources and the manifest file.</p> + <h2> Bitmap rendering in the debugger</h2> + <p>While debugging, you can now right-click on bitmap variables in your app and invoke + <em>View Bitmap</em>. This fetches the associated data from the debugged process and renders + the bitmap in the debugger. </p> + <p><img src="{@docRoot}images/tools/studio-bitmap-rendering.png" style="width:350px"/></p> + <p class="img-caption"><strong>Figure 13.</strong> Bitmap Rendering/p> -<p>The new project structure is due to the switch to a Gradle-based build system. This structure -provides more flexibility to the build process and will allow multiple build variants (a feature not -yet fully implemented). Everything still behaves as you expect, but some of the files have moved -around. For the most part, you should need to modify only the files under the {@code src/} -directory. More information about the Gradle project structure is available in the -<a href="http://tools.android.com/tech-docs/new-build-system/user-guide">Gradle -Plugin User Guide</a>.</p> + <h2>Output window message filtering</h2> + <p>When checking build results, you can filter messages by <em>message type</em> to quickly + locate messages of interest.</p> + <img src="{@docRoot}images/tools/studio-outputwindowmsgfiltering.png" style="width:200px"style="width:200px" /> + <p class="img-caption"><strong>Figure 14.</strong> Filter Build Messages</p> -<h2 id="Basics">Basic Operations</h2> -<p>The following topics describe how to perform -some basic development tasks with Android Studio.</p> + <h2>Hierarchical parent setting</h2> + <p>The activity parent can now be set in the Activity Wizard when creating a new + activity. Setting a <em>hierarchal parent</em> sets the {@code Up} button to automatically + appear in the app's Action bar when viewing a child activity, so the {@code Up} + button no longer needs to be manually specified in the <em>menu.xml</em> file.</p> + + + <h2>Creating layouts</h2> + <p>Android Studio offers an advanced layout editor that allows you to drag-and-drop widgets + into your layout and preview your layout while editing the XML.</p> + + <p>While editing in the <strong>Text</strong> view, you can preview the layout on devices by + opening the <strong>Preview</strong> pane available on the right side of the window. Within the + Preview pane, you can modify the preview by changing various options at the top of the pane, + including the preview device, layout theme, platform version and more. To preview the layout on + multiple devices simultaneously, select <strong>Preview All Screen Sizes</strong> from the + device drop-down.</p> + <p><img src="{@docRoot}images/tools/studio-previewall.png" style="width:350px"/></p> + <p class="img-caption"><strong>Figure 15.</strong> Preview All Screens/p> + + <p>You can switch to the graphical editor by clicking <strong>Design</strong> at the + bottom of the window. While editing in the Design view, you can show and hide the + widgets available to drag-and-drop by clicking <strong>Palette</strong> on the left side of the + window. Clicking <strong>Designer</strong> on the right side of the window reveals a panel + with a layout hierarchy and a list of properties for each view in the layout.</p> + + + <h2 id="intellij">Working with IntelliJ</h3> + + <p>This section list just a few of the code editing + practices you should consider using when creating Android Studio apps. </p> + + <p>For complete user documentation for the IntelliJ IDEA interface (upon which Android Studio + is based), refer to the + <a href="http://www.jetbrains.com/idea/documentation/index.jsp">IntelliJ IDEA documentation</a>.</p> + -<p class="note"><strong>Note:</strong> This section lists Android Studio keyboard shortcuts -for the default keymap. To change the default keymap on Windows and Linux, go to -<strong>File</strong> > <strong>Settings</strong> > <strong>Keymap</strong>. To change -the default keymap on Mac OS X, go to <strong>Android Studio</strong> > -<strong>Preferences</strong> > <strong>Keymap</strong>.</p> -<h3>Creating virtual devices</h3> + <h3><em>Alt + Enter</em> key binding</h3> + <p>For quick fixes to coding errors, the IntelliJ powered IDE implements the <em>Alt + Enter</em> + key binding to fix errors (missing imports, variable assignments, missing references, etc) when + possible, and if not, suggest the most probably solution. </p> -<p>All the capabilities of the <a href="{@docRoot}tools/devices/managing-avds.html">Android -Virtual Device Manager</a> are accessible directly from -the Android Studio interface. Click the <strong>Android Virtual Device Manager</strong> -<img src="{@docRoot}images/tools/avd-manager-studio.png" -style="vertical-align:bottom;margin:0;height:19px" /> in the toolbar to open it and create -new virtual devices for running your app in the emulator.</p> + <h3><em>Ctrl + D</em> key binding</h3> + <p>The <em>Ctrl + D</em> key binding is great for quickly duplicating code lines or fragments. + Simply select the desired line or fragment and enter this key binding. </p> -<h3>Installing SDK updates</h3> -<p>The <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a> -is also accessible to download new Android tools, platforms, and libraries -for your app. Click the <strong>SDK Manager</strong> -<img src="{@docRoot}images/tools/sdk-manager-studio.png" -style="vertical-align:bottom;margin:0;height:19px" /> in the toolbar to open it and check -for updates.</p> + <h3>Navigate menu</h3> + <p>In case you're not familiar with an API class, file or symbol, the <em>Navigate</em> menu lets + you jump directly to the class of a method or field name without having to search through + individual classes. </p> -<h3>Creating new files</h3> + <h3>Inspection scopes</h3> + <p>Scopes set the color of code segments for easy code identification and location. For example, + you can set a scope to identify all code related to a specific action bar. </p> -<p>You can quickly add new code and resource files by clicking the appropriate directory in the -<strong>Project</strong> pane and pressing ALT + INSERT on Windows and Linux or COMMAND + N 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 ALT + INSERT 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> + <h3>External annotations</h3> + <p>Specify annotations within the code or from an external annotation file. The Android Studio + IDE keeps track of the restrictions and validates compliance, for example setting the data type + of a string as not null.</p> -<h3>Creating layouts</h3> -<p>Android Studio offers an advanced layout editor that allows you to drag-and-drop widgets -into your layout and preview your layout while editing the XML.</p> -<p>While editing in the <strong>Text</strong> view, you can preview the layout on devices by opening -the <strong>Preview</strong> pane available on the right side of the window. Within the -Preview pane, you can modify the preview by changing various options at the top of the pane, including -the preview device, layout theme, platform version and more. To preview the layout on multiple -devices simultaneously, select <strong>Preview All Screen Sizes</strong> from the device drop-down. -</p> + <h3>Injecting languages</h3> + <p>With language injection, the Android Studio IDE allows you to work with islands of different + languages embedded in the source code. This extends the syntax, error highlighting and coding + assistance to the embedded language. This can be especially useful for checking regular expression + values inline, and validating XML and SQL statments.</p> -<p>You can switch to the graphical editor by clicking <strong>Design</strong> at the -bottom of the window. While editing in the Design view, you can show and hide the -widgets available to drag-and-drop by clicking <strong>Palette</strong> on the -left side of the window. Clicking <strong>Designer</strong> on the right side of the window reveals -a panel with a layout hierarchy and a list of properties for each view in the layout.</p> + <h3>Code folding</h3> + <p>This allows you to selectively hide and display sections of the code for readability. For + example, resource expressions or code for a nested class can be folded or hidden in to one line + to make the outer class structure easier to read. The inner clas can be later expanded for + updates. </p> -<h3>Debugging</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> + <h3>Image and color preview</h3> + <p>When referencing images and icons in your code, a preview of the image or icon appears + (in actual size at different densities) in the code margin to help you verify the image or icon + reference. Pressing {@code F1} with the preview image or icon selected displays resource asset + details, such as the <em>dp</em> settings. </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 -clicking <strong>Monitor</strong> <img src="{@docRoot}images/tools/monitor-studio.png" -style="vertical-align:bottom;margin:0;height:19px" /> in the toolbar. The Debug Monitor is where -you can find the complete set of <a href="{@docRoot}tools/debugging/ddms.html">DDMS</a> -tools for profiling your app, controlling device -behaviors, and more. It also includes the Hierarchy Viewer tools to help -<a href="{@docRoot}tools/debugging/debugging-ui.html">optimize your layouts</a>.</p> + <h3>Quick F1 documentation</h3> + <p>You can now inspect theme attributes using <strong>View > Quick Documentation</strong> + (<strong>F1</strong>), + see the theme inheritance hierarchy, and resolve values for the various attributes.</p> + <p>If you invoke <strong> View > Quick Documentation</strong> (usually bound to F1) on the theme + attribute <em>?android:textAppearanceLarge</em>, you will see the theme inheritance hierarchy and + resolved values for the various attributes that are pulled in.</p> + <h3>New Allocation Tracker integration in the Android/DDMS window</h3> + <p>You can now inspect theme attributes using <strong> View > Quick Documentation + </strong> <code>F1</code>, see the theme inheritance hierarchy, and resolved values for the + various attributes.</p> + <img src="{@docRoot}images/tools/studio-allocationtracker.png" style="width:300px" /> + <p class="img-caption"><strong>Figure 16</strong> Allocation Tracker</p> -<h2 id="KeyCommands">Keyboard Commands</h2> + + + +<h3 id="key-commands">Keyboard Commands</h3> <p>The following tables list keyboard shortcuts for common operations.</p> +<p class="note"><strong>Note:</strong> This section lists Android Studio keyboard shortcuts +for the default keymap. To change the default keymap on Windows and Linux, go to +<strong>File</strong> > <strong>Settings</strong> > <strong>Keymap</strong>. To change +the default keymap on Mac OS X, go to <strong>Android Studio</strong> > +<strong>Preferences</strong> > <strong>Keymap</strong>.</p> + <p class="note"><strong>Note:</strong> If you're using Mac OS X, update your keymap to use the Mac OS X 10.5+ version keymaps under <strong>Android Studio > Preferences > Keymap</strong>.</p> - <p class="table-caption"><strong>Table 1.</strong> Programming key commands</p> <table> <tr><th>Action</th><th>Android Studio Key Command</th></tr> @@ -227,7 +255,14 @@ the Mac OS X 10.5+ version keymaps under <strong>Android Studio > Preferences > </table> -<p>For a complete keymap reference guide, see the <a -href="http://www.jetbrains.com/idea/documentation/index.jsp">IntelliJ IDEA</a> -documentation.</p> +<p>For a complete keymap reference guide, see the +<a href="http://www.jetbrains.com/idea/documentation/index.jsp">IntelliJ IDEA</a> documentation.</p> + + +</div> + + +</div> + + diff --git a/docs/html/sdk/installing/studio.jd b/docs/html/sdk/installing/studio.jd deleted file mode 100644 index 1bcee0a..0000000 --- a/docs/html/sdk/installing/studio.jd +++ /dev/null @@ -1,731 +0,0 @@ -page.title=Android Studio -page.tags="studio" -page.image=images/resource-card-android-studio.png -page.metaDescription=Learn about the new features in Android Studio. -@jd:body - - - - -<div style="position:relative;min-height:660px;"> - -<h3 style="color:#FF4444;margin:-30px 0 20px">BETA</h3> - -<div id="tos" style="position:absolute;display:none;width:inherit;"> -<div class="col-13" style="margin:0;"> </div><!-- provides top margin for content --> - - -<p class="sdk-terms-intro">Before installing the Android SDK, you must agree to the following terms and conditions.</p> - -<div class="sdk-terms" onfocus="this.blur()"> -<h2 class="norule">Terms and Conditions</h2> -This is the Android Software Development Kit License Agreement - -<h3>1. Introduction</h3> -1.1 The Android Software Development Kit (referred to in this License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK. - -1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time. - -1.3 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States. - - -<h3>2. Accepting this License Agreement</h3> -2.1 In order to use the SDK, you must first agree to this License Agreement. You may not use the SDK if you do not accept this License Agreement. - -2.2 By clicking to accept, you hereby agree to the terms of this License Agreement. - -2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries including the country in which you are resident or from which you use the SDK. - -2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the SDK on behalf of your employer or other entity. - - -<h3>3. SDK License from Google</h3> -3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable and non-exclusive license to use the SDK solely to develop applications to run on the Android platform. - -3.2 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you. - -3.3 You may not use the SDK for any purpose not expressly permitted by this License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK; or (b) load any part of the SDK onto a mobile handset or any other hardware device except a personal computer, combine any part of the SDK with other software, or distribute any software or device incorporating a part of the SDK. - -3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the SDK. - -3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not this License Agreement. - -3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google's sole discretion, without prior notice to you. - -3.7 Nothing in this License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features. - -3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK. - - -<h3>4. Use of the SDK by You</h3> -4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications. - -4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) this License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries). - -4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so. - -4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier. - -4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so. - -4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under this License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach. - - -<h3>5. Your Developer Credentials</h3> -5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials. - - -<h3>6. Privacy and Information</h3> -6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected. - -6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy. - - -<h3>7. Third Party Applications</h3> -7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources. - -7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners. - -7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, this License Agreement does not affect your legal relationship with these third parties. - - -<h3>8. Using Android APIs</h3> -8.1 Google Data APIs - -8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service. - -8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so. - - -<h3>9. Terminating this License Agreement</h3> -9.1 This License Agreement will continue to apply until terminated by either you or Google as set out below. - -9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials. - -9.3 Google may at any time, terminate this License Agreement with you if: -(A) you have breached any provision of this License Agreement; or -(B) Google is required to do so by law; or -(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or -(D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable. - -9.4 When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely. - - -<h3>10. DISCLAIMER OF WARRANTIES</h3> -10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE. - -10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. - -10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - - -<h3>11. LIMITATION OF LIABILITY</h3> -11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING. - - -<h3>12. Indemnification</h3> -12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this License Agreement. - - -<h3>13. Changes to the License Agreement</h3> -13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available. - - -<h3>14. General Legal Terms</h3> -14.1 This License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the SDK. - -14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google. - -14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable. - -14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to this License Agreement. - -14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE. - -14.6 The rights granted in this License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party. - -14.7 This License Agreement, and your relationship with Google under this License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from this License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction. - - -<em>November 13, 2012</em> -</div> - - - -<div id="sdk-terms-form"> -<p> -<input id="agree" type="checkbox" name="agree" value="1" onclick="onAgreeChecked()" /> -<label id="agreeLabel" for="agree">I have read and agree with the above terms and conditions</label> -</p> -<p id="bitpicker" style="display:none"> - <input id="32" onclick="onAgreeChecked()" type="radio" name="bit" value="32"> - <label for="32">32-bit</label> - <input id="64" onclick="onAgreeChecked()" type="radio" name="bit" value="64"> - <label for="64">64-bit</label> -</p> -<p><a href="" class="button disabled" id="downloadForRealz" onclick="return onDownloadForRealz(this);"></a></p> -</div> - - - -</div><!-- end TOS --> - - - - - - - - - - - - - - - - -<div id="main"> - -<div class="figure" style="width:400px;margin-top:-75px"> -<img src="{@docRoot}images/tools/laptop-studio.png" height="366" width="400" style="margin-bottom:20px" /> - -<a class="big button subtitle" id="download-ide-button" -href="" style="display:none;width:368px;margin:0 auto;display:block;font-size:18px" ></a> -<div style="margin:20px 0 0 0"> - -<p style="margin-bottom:8px">This installation includes:</p> -<ul style="margin-bottom:20px"> - <li>Android Studio Beta</li> - <li>All the Android SDK Tools to design, test, and debug your app</li> - <li>A version of the Android platform to compile your app</li> - <li>A version of the Android system image to run your app in the emulator</li> -</ul> - -</div> -</div> - - - -<p>Android Studio is a new Android development environment based on IntelliJ -IDEA. It provides new features and improvements over Eclipse ADT -and will be the official Android IDE once it's ready. On top of the -capabilities you expect from IntelliJ, Android Studio offers:</p> - -<ul> - <li>Flexible Gradle-based build system.</li> - <li>Build variants and multiple APK generation.</li> - <li>Expanded template support for Google Services and various device types.</li> - <li>Rich layout editor with support for theme editing.</li> - <li>Lint tools to catch performance, usability, version compatibility, and other problems.</li> - <li>ProGuard and app-signing capabilities.</li> - <li>Built-in support for <a - href="https://developers.google.com/cloud/mobile" - class="external-link">Google Cloud Platform</a>, making it easy to integrate Google Cloud - Messaging and App Engine. -</ul> - -<p class="caution"><strong>Caution:</strong> Android Studio is currently in -<strong>beta</strong>. Some features -are not yet implemented and you may encounter bugs. If you are not -comfortable using an unfinished product, you may want to instead -download (or continue to use) -<a href="{@docRoot}sdk/index.html">Eclipse with ADT</a>.</p> - - -<h4 style="margin-top: 20px;"><a href='' class="expandable" - onclick="toggleExpandable(this,'.pax');hideExpandable('.reqs');return false;" - >VIEW ALL DOWNLOADS AND SIZES</a></h4> - -<div class="pax col-13 online" style="display:none;margin:0;"> - - <table class="download"> - <tr> - <th>Platform</th> - <th>Package</th> - <th>Size</th> - <th>SHA Sum</th> - </tr> - - <tr> - <td>Windows</td> - <td> - <a onclick="return onDownload(this)" id="win-studio" - href="https://dl.google.com/dl/android/studio/ide-zips/0.8.14/android-studio-ide-135.1538390-windows.zip">android-studio-ide-135.1538390-windows.zip - </a> - </td> - <td>177343814 bytes</td> - <td>b533480200ba893616c73b32477e66ebb357a1b3</td> - </tr> - - <tr> - <td><nobr>Mac OS X</nobr></td> - <td> - <a onclick="return onDownload(this)" id="mac-studio" - href="https://dl.google.com/dl/android/studio/ide-zips/0.8.14/android-studio-ide-135.1538390-mac.zip"> - android-studio-ide-135.1538390-mac.zip - </a> - </td> - <td>176745627 bytes</td> - <td>4070e6f6a44d042266f46f1f2f9ca3448ac23f8cd</td> - </tr> - - <tr> - <td>Linux</td> - <td> - <a onclick="return onDownload(this)" id="linux-studio" - href="https://dl.google.com/dl/android/studio/ide-zips/0.8.14/android-studio-ide-135.1538390-linux.zip">android-studio-ide-135.1538390-linux.zip - </a> - </td> - <td>176358193 bytes</td> - <td>718356b49254f6c4e55c64b99164d311995205dd</td> - </tr> - </table> - -</div><!-- end pax --> - - -<h4 style="margin-top: 20px;"><a href='' class="expandable" - onclick="toggleExpandable(this,'.reqs');hideExpandable('.pax');return false;" - >SYSTEM REQUIREMENTS</a></h4> - -<div class="reqs col-13 online" style="display:none;margin:0;"> -<table> -<tr> -<th>Windows</th> -<th style="width:40%">Mac OS</th> -<th>Linux</th> -</tr> -<tr> -<td> -<ul> - <li>Microsoft Windows 8/7/Vista/2003 (32 or 64 bit)</li> - <li>2 GB RAM minimum, 4 GB RAM recommended</li> - <li>400 MB disk space </li> - <li>At least 1 GB for Android SDK, emulator system images, and caches</li> - <li>1280x800 minimum screen resolution</li> - <li>Java Development Kit (JDK) 7 or higher</li> - <li>(Optional for accelerated emulator: Intel processor with support for Intel VT-x, Intel - EM64T (Intel 64), and Execute Disable (XD) Bit functionality)</li> -</ul> -</td> -<td> -<ul> - <li>Mac OS X 10.8.5 or higher, up to 10.9 (Mavericks)</li> - <li>2 GB RAM minimum, 4 GB RAM recommended</li> - <li>400 MB disk space</li> - <li>At least 1 GB for Android SDK, emulator system images, and caches</li> - <li>1280x800 minimum screen resolution</li> - <li>Java Runtime Environment (JRE) 6</li> - <li>Java Development Kit (JDK) 7 or higher - <p>On Mac OS, run Android Studio with Java Runtime Environment (JRE) 6 for optimized font - rendering. You can then configure your project to use Java Development Kit (JDK) JDK 7.</p></li> - <li>(Optional for accelerated emulator: Intel processor with support for Intel VT-x, Intel - EM64T (Intel 64), and Execute Disable (XD) Bit functionality)</li> -</ul> - -</td> -<td> -<ul> - <li>GNOME or KDE desktop.</li> - <li>Tested on Ubuntu 12.04, Precise Pangolin (64-bit distribution capable of running 32-bit - applications)</li> - <li>GNU C Library (glibc) 2.11 or later is required.</li> - <li>2 GB RAM minimum, 4 GB RAM recommended</li> - <li>400 MB disk space</li> - <li>At least 1 GB for Android SDK, emulator system images, and caches</li> - <li>1280x800 minimum screen resolution</li> - <li>Java Development Kit (JDK) 7 or higher</li> -</ul> -</td> -</tr> -</table> -</div><!-- end pax --> - - - -<h2 style="margin-bottom: 0px;">Android Studio vs. Eclipse ADT Comparison</h2> - -<p> -The following table lists some key differences between Android Studio Beta and -<a href="{@docRoot}sdk/index.html">Eclipse with ADT</a>. -</p> - -<style> -td.yes { - color: #669900; -} -td.no { - color: #CC0000; -} -</style> - -<table> - <tbody><tr> - <th>Feature</th> - <th>Android Studio</th> - <th>ADT</th> - </tr> - <tr> - <td>Build system</td> - <td><a href="http://www.gradle.org/" class="external-link">Gradle</a></td> - <td><a href="http://ant.apache.org/" class="external-link">Ant</a></td> - </tr> - <tr> - - <td>Maven-based build dependencies</td> - <td class="yes">Yes</td> - <td class="no">No</td> - </tr> - - <td>Build variants and multiple-APK generation (great for Android Wear)</td> - <td class="yes">Yes</td> - <td class="no">No</td> - </tr> - - <tr> - <td>Advanced Android code completion and refactoring</td> - <td class="yes">Yes</td> - <td class="no">No</td> - </tr> - <tr> - <td>Graphical layout editor</td> - <td class="yes">Yes</td> - <td class="yes">Yes</td> - </tr> - <tr> - </tr> - - <tr> - <td>APK signing and keystore management</td> - <td class="yes">Yes</td> - <td class="yes">Yes</td> - </tr> - - <tr> - <td>NDK support</td> - <td class="no">Coming soon</td> - <td class="yes">Yes</td> - </tr> - </tbody></table> - - - -<h2 id="Updating">Updating from older versions</h2> - -<p>If you already have Android Studio installed, in most cases, you can upgrade to the latest -version by installing a patch. From within Android Studio, select -<strong>Help > Check for updates</strong> (on Mac, <strong>Android Studio > -Check for updates</strong>) to see whether an update is available.</p> - -<p>If an update is not available, -click the button above to download and replace your existing -installation.</p> - -<div class="caution"> -<p><strong>Caution:</strong> Replacing your existing installation of -Android Studio will remove any additional SDK packages you've installed, such as target -platforms, system images, and sample apps. To preserve these, copy them from your current -SDK directory to a temporary location -before installing the update. Then move them back once the update is complete. -If you fail to copy these packages, then you can instead download them again through -the Android SDK Manager.</p> -</div> - -<p>As you continue developing apps, you may need to install additional versions -of Android for the emulator and other packages such as the <a -href="{@docRoot}tools/support-library/index.html">Android Support Library</a>. -To install more packages, use -the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>, which you can -open from Android Studio by clicking <strong>SDK Manager</strong> -<img src="{@docRoot}images/tools/sdk-manager-studio.png" -style="vertical-align:bottom;margin:0;height:19px" /> in the toolbar.</p> - - - - - - - - - -<h2 id="Revisions">Revisions</h2> - -<div class="toggle-content opened"> - <p><a href="#" onclick="return toggleContent(this)"> - <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img" - alt=""/>Android Studio v0.8.14</a> <em>(October 2014)</em> - </p> - - <div class="toggle-content-toggleme"> - <p>See <a href="http://tools.android.com/recent">tools.android.com</a> for a full list of changes.</p> - </div> -</div> - -<div class="toggle-content closed"> - <p><a href="#" onclick="return toggleContent(this)"> - <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" - alt=""/>Android Studio v0.8.6</a> <em>(August 2014)</em> - </p> - - <div class="toggle-content-toggleme"> - <p>See <a href="http://tools.android.com/recent">tools.android.com</a> for a full list of changes.</p> - </div> -</div> - -<div class="toggle-content closed"> - <p><a href="#" onclick="return toggleContent(this)"> - <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" - alt=""/>Android Studio v0.8.0</a> <em>(June 2014)</em> - </p> - - <div class="toggle-content-toggleme"> - <p>Added support for Android Wear projects.</p> - <p>See <a href="http://tools.android.com/recent">tools.android.com</a> for a full list of changes.</p> - </div> -</div> - -<div class="toggle-content closed"> - <p><a href="#" onclick="return toggleContent(this)"> - <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" - alt=""/>Android Studio v0.5.2</a> <em>(May 2014)</em> - </p> - - <div class="toggle-content-toggleme"> - <ul> - <li>See <a href="http://tools.android.com/recent">tools.android.com</a> for a full list of changes.</li> - </ul> - </div> -</div> - -<div class="toggle-content closed"> - <p><a href="#" onclick="return toggleContent(this)"> - <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" - alt=""/>Android Studio v0.4.6</a> <em>(March 2014)</em> - </p> - - <div class="toggle-content-toggleme"> - <ul> - <li>See <a href="http://tools.android.com/recent">tools.android.com</a> for a full list of changes.</li> - </ul> - </div> -</div> - -<div class="toggle-content closed"> - <p><a href="#" onclick="return toggleContent(this)"> - <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" - alt=""/>Android Studio v0.4.2</a> <em>(Jan 2014)</em> - </p> - - <div class="toggle-content-toggleme"> - <ul> - <li>See <a href="http://tools.android.com/recent">tools.android.com</a> for a full list of changes.</li> - </ul> - </div> -</div> - -<div class="toggle-content closed"> - <p><a href="#" onclick="return toggleContent(this)"> - <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" - alt=""/>Android Studio v0.3.2</a> <em>(Oct 2013)</em> - </p> - - <div class="toggle-content-toggleme"> - <ul> - <li>See <a href="http://tools.android.com/recent">tools.android.com</a> for a full list of changes.</li> - </ul> - </div> -</div> - -<div class="toggle-content closed"> - <p><a href="#" onclick="return toggleContent(this)"> - <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" - alt=""/>Android Studio v0.2.x</a> <em>(July 2013)</em> - </p> - - <div class="toggle-content-toggleme"> - <ul> - <li>Merged in the latest IntelliJ codebase changes. Includes fixes for issues reported by Studio users such as tweaks to Linux font sizes and font rendering.</li> - <li>Android Gradle plug-in updated to 0.5.0. - <p class="caution"><strong>Caution:</strong> This new version is not backwards compatible. - When opening a project that uses an older version of the plug-in, Studio will show an error - stating <strong>Gradle <project_name> project refresh failed.</strong></p> - <p>The updated Gradle plug-in includes the following changes:</p> - <ul> - <li>Fixed IDE model to contain the output file even if it's customized through the DSL. Also - fixed the DSL to get/set the output file on the variant object so that it's not necessary to - use <code>variant.packageApplication or variant.zipAlign</code></li> - <li>Fixed dependency resolution so that we resolved the combination of (default config, - build types, flavor(s)) together instead of separately.</li> - <li>Fixed dependency for tests of library project to properly include all the dependencies - of the library itself.</li> - <li>Fixed case where two dependencies have the same leaf name.</li> - <li>Fixed issue where Proguard rules file cannot be applied on flavors.</li> - </ul> - <p>All Gradle plugin release notes are available are here: <a href= - "http://tools.android.com/tech-docs/new-build-system" - >http://tools.android.com/tech-docs/new-build-system</a>.</p> - </li> - <li>Gradle errors from aapt no longer point to merged output files in the build/ folder, they - point back to the real source locations.</li> - <li>Parallel Builds. It's now possible to use Gradle's parallel builds. Please be aware that - parallel builds are in "incubation" (see <a - href="http://www.gradle.org/docs/current/userguide/gradle_command_line.html">Gradle's - documentation</a>.) This feature is off by default. To enable it, go to - <strong>Preferences</strong> > <strong>Compiler</strong> and check the box <em>Compile - independent modules in parallel</em>.</li> - <li>Further work on the new resource repository used for layout rendering, resource - folding in the editor, and more: - <ul> - <li>Basic support for .aar library dependencies (e.g. using a library without a local copy of - the sources). Still not working for resource XML validation and navigation in source editors. - </li> - <li>Cycle detection in resource references.</li> - <li>Quick Documentation (F1), which can show all translations of the string under the caret, - will now also show all resource overlays from the various Gradle flavors and build types, as - well as libraries. They are listed in reverse resource overlay order, with strikethrough on - the versions of the string that are masked.</li> - <li>Fixes to handle updating the merged resources when the set of module dependencies - change.</li> - <li>XML rendering fixes to properly handle character entity declarations and XML and unicode - escapes.</li> - </ul> - <li>Save screenshot support for the layout preview and layout editor windows.</li> - <li>Template bug fixes.</li> - <li>Lint bug fixes.</li> - <li>Various fixes for crash reports. Thank you, and keep filing crash reports!</li> - </ul> - </div> -</div> - -<div class="toggle-content closed"> - <p><a href="#" onclick="return toggleContent(this)"> - <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" - alt=""/>Android Studio v0.1.x</a> <em>(May 2013)</em> - </p> - - <div class="toggle-content-toggleme"> - <ul> - <li>Various bug fixes, including a fix for a common Windows installation issue. - </ul> - </div> -</div> - -<p> </p> - -<p class="note"><strong>Note:</strong> Periodic updates are pushed to Android Studio -without requiring you to update from here. To manually check for updates, select -<strong>Help > Check for updates</strong> (on Mac, select <strong>Android Studio > -Check for updates</strong>).</p> - - - - -<h2 id="Troubleshooting">Troubleshooting</h2> - -<p>If you encounter problems in Android Studio, look at the following page -for possible resolutions to known issues: <a href="http://tools.android.com/knownissues" ->http://tools.android.com/knownissues</a>.</p> - - - -</div><!-- end main content --> - - - - -</div><!-- end relative position wrapper --> - - - - - - - - -<script> - var os; - var bundlename; - var $toolslink; - - if (navigator.appVersion.indexOf("Win")!=-1) { - os = "Windows"; - bundlename = 'win-studio'; - } else if (navigator.appVersion.indexOf("Mac")!=-1) { - os = "Mac"; - bundlename = 'mac-studio'; - } else if (navigator.appVersion.indexOf("Linux")!=-1) { - os = "Linux"; - bundlename = 'linux-studio'; - } - - if (os) { - /* set up primary ACE download button */ - $('#download-ide-button').show(); - $('#download-ide-button').append("Download Android Studio Beta <span class='small'>v0.8.14</span>" - + "<br/> <span class='small'>with the Android SDK for " + os + "</span>"); - $('#download-ide-button').click(function() {return onDownload(this,true);}).attr('href', bundlename); - - } else { - $('.pax').show(); - } - - - function onDownload(link, button) { - var $studioLink; - - /* set text for download button */ - if (button) { - $studioLink = $("a#"+$(link).attr('href')); - $("#downloadForRealz").html($(link).text()); - } else { - $studioLink = $(link); - $("#downloadForRealz").html("Download " + $(link).text()); - } - - $("#downloadForRealz").attr('href', $studioLink.attr('href')); - - $("#tos").fadeIn('fast'); - $("#main").fadeOut('fast'); - - location.hash = "download"; - return false; - } - - - function onAgreeChecked() { - /* verify that the TOS is agreed */ - if ($("input#agree").is(":checked")) { - /* reveal the download button */ - $("a#downloadForRealz").removeClass('disabled'); - } else { - $("a#downloadForRealz").addClass('disabled'); - } - } - - function onDownloadForRealz(link) { - if ($("input#agree").is(':checked')) { - $("h1").text('Now redirecting to the install instructions...'); - $("#tos").slideUp(); - $("#jd-content .jd-descr").fadeOut('slow', function() { - setTimeout(function() { - window.location = "/sdk/installing/index.html?pkg=studio"; - }, 1000); - }); - ga('send', 'event', 'SDK', 'Android Studio', $("#downloadForRealz").html()); - return true; - } else { - $("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#258AAF"}, 200, - function() {$("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#222"}, 200)} - ); - return false; - } - } - - $(window).hashchange( function(){ - if (location.hash == "") { - location.reload(); - } - }); - -</script> diff --git a/docs/html/tools/basics/studio-tips.jd b/docs/html/tools/basics/studio-tips.jd deleted file mode 100644 index 253c944..0000000 --- a/docs/html/tools/basics/studio-tips.jd +++ /dev/null @@ -1,279 +0,0 @@ -page.title=Android Studio Tips and Tricks -@jd:body - -<div id="qv-wrapper"> -<div id="qv"> - - <h2>In this document</h2> - <ol> - <li><a href="#whats-new">What's New</a></li> - <li><a href="#tips-tricks">Tips & Tricks</a></li> - <li><a href="#intellij">Working with IntelliJ</a></li> - <li><a href="#key-commands">Key Commands</a></li> - </ol> - - <h2>See also</h2> - <ol> - <li><a href="{@docRoot}tools/sdk/index.html">Download Android Studio</a></li> - <li><a href="{@docRoot}tools/sdk/index.html">Download Standalone SDK tools.</a> </li> - <li><a href="http://wiki.jetbrains.net/intellij/Android">IntelliJ IDEA Android Tutorials</a></li> - <li><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/FAQ+on+Migrating+to+IntelliJ+IDEA">IntelliJ FAQ on migrating to IntelliJ IDEA</a></li> - <li><a href="{@docRoot}tools/buildsystem/index.html">Build System</a></li> - </ol> - -</div> -</div> - -<p>If you're unfamiliar with using Android Studio and the IntelliJ IDEA interface, this page -provides some tips to help you get started with some of the most common tasks and productivity -enhancements. </p> - - - - <h2>Smart Rendering</h2> - <p>With smart rendering, Android Studio displays links for quick fixes to rendering errors. - For example, if you add a button to the layout without specifying the <em>width</em> and - <em>height</em> atttributes, Android Studio displays the rendering message <em>Automatically - add all missing attributs</em>. Clicking the message adds the missing attributes to the layout.</p> - - - <h2> Bitmap rendering in the debugger</h2> - <p>While debugging, you can now right-click on bitmap variables in your app and invoke - <em>View Bitmap</em>. This fetches the associated data from the debugged process and renders - the bitmap in the debugger. </p> - <p><img src="{@docRoot}images/tools/studio-bitmap-rendering.png" style="width:350px"/></p> - <p class="img-caption"><strong>Figure 13.</strong> Bitmap Rendering/p> - - - <h2>Output window message filtering</h2> - <p>When checking build results, you can filter messages by <em>message type</em> to quickly - locate messages of interest.</p> - <img src="{@docRoot}images/tools/studio-outputwindowmsgfiltering.png" style="width:200px"style="width:200px" /> - <p class="img-caption"><strong>Figure 14.</strong> Filter Build Messages</p> - - - - <h2>Hierarchical parent setting</h2> - <p>The activity parent can now be set in the Activity Wizard when creating a new - activity. Setting a <em>hierarchal parent</em> sets the {@code Up} button to automatically - appear in the app's Action bar when viewing a child activity, so the {@code Up} - button no longer needs to be manually specified in the <em>menu.xml</em> file.</p> - - - <h2>Creating layouts</h2> - <p>Android Studio offers an advanced layout editor that allows you to drag-and-drop widgets - into your layout and preview your layout while editing the XML.</p> - - <p>While editing in the <strong>Text</strong> view, you can preview the layout on devices by - opening the <strong>Preview</strong> pane available on the right side of the window. Within the - Preview pane, you can modify the preview by changing various options at the top of the pane, - including the preview device, layout theme, platform version and more. To preview the layout on - multiple devices simultaneously, select <strong>Preview All Screen Sizes</strong> from the - device drop-down.</p> - <p><img src="{@docRoot}images/tools/studio-previewall.png" style="width:350px"/></p> - <p class="img-caption"><strong>Figure 15.</strong> Preview All Screens/p> - - <p>You can switch to the graphical editor by clicking <strong>Design</strong> at the - bottom of the window. While editing in the Design view, you can show and hide the - widgets available to drag-and-drop by clicking <strong>Palette</strong> on the left side of the - window. Clicking <strong>Designer</strong> on the right side of the window reveals a panel - with a layout hierarchy and a list of properties for each view in the layout.</p> - - - <h2 id="intellij">Working with IntelliJ</h3> - - <p>This section list just a few of the code editing - practices you should consider using when creating Android Studio apps. </p> - - <p>For complete user documentation for the IntelliJ IDEA interface (upon which Android Studio - is based), refer to the - <a href="http://www.jetbrains.com/idea/documentation/index.jsp">IntelliJ IDEA documentation</a>.</p> - - - - <h3><em>Alt + Enter</em> key binding</h3> - <p>For quick fixes to coding errors, the IntelliJ powered IDE implements the <em>Alt + Enter</em> - key binding to fix errors (missing imports, variable assignments, missing references, etc) when - possible, and if not, suggest the most probably solution. </p> - - - <h3><em>Ctrl + D</em> key binding</h3> - <p>The <em>Ctrl + D</em> key binding is great for quickly duplicating code lines or fragments. - Simply select the desired line or fragment and enter this key binding. </p> - - - <h3>Navigate menu</h3> - <p>In case you're not familiar with an API class, file or symbol, the <em>Navigate</em> menu lets - you jump directly to the class of a method or field name without having to search through - individual classes. </p> - - - <h3>Inspection scopes</h3> - <p>Scopes set the color of code segments for easy code identification and location. For example, - you can set a scope to identify all code related to a specific action bar. </p> - - - - <h3>External annotations</h3> - <p>Specify annotations within the code or from an external annotation file. The Android Studio - IDE keeps track of the restrictions and validates compliance, for example setting the data type - of a string as not null.</p> - - - - <h3>Injecting languages</h3> - <p>With language injection, the Android Studio IDE allows you to work with islands of different - languages embedded in the source code. This extends the syntax, error highlighting and coding - assistance to the embedded language. This can be especially useful for checking regular expression - values inline, and validating XML and SQL statments.</p> - - - <h3>Code folding</h3> - <p>This allows you to selectively hide and display sections of the code for readability. For - example, resource expressions or code for a nested class can be folded or hidden in to one line - to make the outer class structure easier to read. The inner clas can be later expanded for - updates. </p> - - - <h3>Image and color preview</h3> - <p>When referencing images and icons in your code, a preview of the image or icon appears - (in actual size at different densities) in the code margin to help you verify the image or icon - reference. Pressing {@code F1} with the preview image or icon selected displays resource asset - details, such as the <em>dp</em> settings. </p> - - - <h3>Quick F1 documentation</h3> - <p>You can now inspect theme attributes using <strong>View > Quick Documentation</strong> - (<strong>F1</strong>), - see the theme inheritance hierarchy, and resolve values for the various attributes.</p> - - <p>If you invoke <strong> View > Quick Documentation</strong> (usually bound to F1) on the theme - attribute <em>?android:textAppearanceLarge</em>, you will see the theme inheritance hierarchy and - resolved values for the various attributes that are pulled in.</p> - - - <h3>New Allocation Tracker integration in the Android/DDMS window</h3> - <p>You can now inspect theme attributes using <strong> View > Quick Documentation - </strong> <code>F1</code>, see the theme inheritance hierarchy, and resolved values for the - various attributes.</p> - <img src="{@docRoot}images/tools/studio-allocationtracker.png" style="width:300px" /> - <p class="img-caption"><strong>Figure 16</strong> Allocation Tracker</p> - - - - -<h3 id="key-commands">Keyboard Commands</h3> - -<p>The following tables list keyboard shortcuts for common operations.</p> - -<p class="note"><strong>Note:</strong> This section lists Android Studio keyboard shortcuts -for the default keymap. To change the default keymap on Windows and Linux, go to -<strong>File</strong> > <strong>Settings</strong> > <strong>Keymap</strong>. To change -the default keymap on Mac OS X, go to <strong>Android Studio</strong> > -<strong>Preferences</strong> > <strong>Keymap</strong>.</p> - -<p class="note"><strong>Note:</strong> If you're using Mac OS X, update your keymap to use -the Mac OS X 10.5+ version keymaps under <strong>Android Studio > Preferences > Keymap</strong>.</p> - - -<p class="table-caption"><strong>Table 1.</strong> Programming key commands</p> -<table> -<tr><th>Action</th><th>Android Studio Key Command</th></tr> - -<tr> - <td>Command look-up (autocomplete command name)</td> - <td>CTRL + SHIFT + A</td> -</tr> - -<tr> - <td>Project quick fix</td> - <td>ALT + ENTER</td> -</tr> - -<tr> - <td>Reformat code</td> - <td>CTRL + ALT + L (Win)<br> - OPTION + CMD + L (Mac)</td> -</tr> - -<tr> - <td>Show docs for selected API</td> - <td>CTRL + Q (Win)<br> - F1 (Mac)</td> -</tr> - -<tr> - <td>Show parameters for selected method</td> - <td>CTRL + P</td> -</tr> - -<tr> - <td>Generate method</td> - <td>ALT + Insert (Win)<br> - CMD + N (Mac)</td> -</tr> - -<tr> - <td>Jump to source</td> - <td>F4 (Win)<br> - CMD + down-arrow (Mac)</td> -</tr> - -<tr> - <td>Delete line</td> - <td>CTRL + Y (Win)<br> - CMD + Backspace (Mac)</td> -</tr> - -<tr> - <td>Search by symbol name</td> - <td>CTRL + ALT + SHIFT + N (Win)<br> - OPTION + CMD + O (Mac)</td> -</tr> - -</table> - - - - -<p class="table-caption"><strong>Table 2.</strong> Project and editor key commands</p> -<table> -<tr><th>Action</th><th>Android Studio Key Command</th></tr> - -<tr> - <td>Build</td> - <td>CTRL + F9 (Win)<br> - CMD + F9 (Mac)</td> -</tr> - -<tr> - <td>Build and run</td> - <td>SHIFT + F10 (Win)<br> - CTRL + R (Mac)</td> -</tr> - -<tr> - <td>Toggle project visibility</td> - <td>ALT + 1 (Win)<br> - CMD + 1 (Mac)</td> -</tr> - -<tr> - <td>Navigate open tabs</td> - <td>ALT + left-arrow; ALT + right-arrow (Win)<br> - CTRL + left-arrow; CTRL + right-arrow (Mac)</td> -</tr> - -</table> - -<p>For a complete keymap reference guide, see the -<a href="http://www.jetbrains.com/idea/documentation/index.jsp">IntelliJ IDEA</a> documentation.</p> - - -</div> - - -</div> - - - diff --git a/docs/html/tools/projects/index.jd b/docs/html/tools/projects/index.jd index 439d3be..d9456f8 100644 --- a/docs/html/tools/projects/index.jd +++ b/docs/html/tools/projects/index.jd @@ -1,4 +1,4 @@ -page.title=Managing Projects +page.title=Managing Projects Overview @jd:body <div id="qv-wrapper"> @@ -6,211 +6,317 @@ page.title=Managing Projects <h2>In this document</h2> <ol> - <li><a href="#ApplicationProjects">Android Projects</a></li> + <li><a href="#ProjectFiles">Android Project Files</a></li> + <li><a href="#ApplicationModules">Android Application Modules</a></li> - <li><a href="#LibraryProjects">Library Projects</a> + <li><a href="#LibraryModules">Library Modules</a> <ol> <li><a href="#considerations">Development considerations</a></li> </ol> </li> - <li><a href="#TestProjects">Test Projects</a></li> + <li><a href="#TestModules">Test Modules</a></li> - <li><a href="#testing">Testing a Library Project</a></li> + <li><a href="#testing">Testing a Library Module</a></li> </ol> </div> </div> - <p>Projects act as containers for storing things such as code and resource files. The SDK tools - expect your projects to follow a specific structure so it can compile and package your - application correctly, so it is highly recommended that you create them with Eclipse and ADT or - with the <code>android</code> tool on the command line. There are three types of projects, and - they all share the same general structure but differ in function:</p> + <p>An Android <em>project</em> contains everything that defines your Android app, from app + source code to build configurations and test code. The SDK tools require that your projects + follow a specific structure so it can compile and package your application correctly. + If you're using Android Studio, it takes care of all this for you.</p> + + <p>A <em>module</em> is the first level of containment within a project that encapsulates + specific types of source code files and resources. There are several types of modules + with a project:</p> <dl> - <dt><strong>Android Projects</strong></dt> - <dd>An Android project is the container for your application's source code, resource files, and - files such as the Ant build and Android Manifest file. An application project is the main type - of project and the contents are eventually built into an <code>.apk</code> file that you install on a - device.</dd> + <dt><strong>Android Application Modules</strong></dt> + + <dd>An Android Application Module is the container for your application's source code, resource + files, and application level settings, such as the module-level build file, resource files, and + Android Manifest file. The application module contents are eventually + built into the <code>.apk</code> file that gets installed on a device.</dd> - <dt><strong>Test Projects</strong></dt> + <dt><strong>Test Modules</strong></dt> - <dd>These projects contain code to test your application projects and are built into - applications that run on a device.</dd> + <dd>These modules contain code to test your application projects and are built into + test applications that run on a device. By default, Android Studio creates the + <em>androidTest</em> module for inserting JUnit tests. </dd> - <dt><strong>Library Projects</strong></dt> + <dt><strong>Library Modules</strong></dt> - <dd>These projects contain shareable Android source code and resources that you can reference + <dd>These modules contain shareable Android source code and resources that you can reference in Android projects. This is useful when you have common code that you want to reuse. - Library projects cannot be installed onto a device, however, they are + Library modules cannot be installed onto a device, however, they are pulled into the <code>.apk</code> file at build time.</dd> + + + <dt><strong>App Engine Modules</strong></dt> + + <dd>Android Studio lets you easily add a cloud backend to your application. A backend allows you + to implement functionality such as backing up user data to the cloud, serving content to client + apps, real-time interactions, sending push notifications through Google Cloud Messaging for + Android (GCM), and more. App Engine modules are App Engine java Servlet Module for backend + development, App Engine java Endpoints Module to convert server-side Java code annotations into + RESTful backend APIs, and App Engine Backend with Google Cloud Messaging to send push notifications + from your server to your Android devices. </dd> + </dl> - <p>When you use the Android development tools to create a new project, the essential files and - folders will be created for you. There are only a handful of files and folders generated for you, - and some of them depend on whether you use the Eclipse plugin or the {@code android} tool to - generate your project. As your application grows in complexity, you might require new kinds of + <p>When you use the Android development tools to create a new project and the module, the essential files + and folders will be created for you. There are only a handful of files and folders generated for you, + and some of them depend on whether you use Android Studio or the {@code android} tool to + generate your module. As your application grows in complexity, you might require new kinds of resources, directories, and files.</p> - <h2 id="ApplicationProjects">Android Projects</h2> +<p class="note"><strong>Note:</strong> Project folders and files apply across the entire Android +project and override similar module file settings.</p> + + + + + <h2 id="ProjectFiles">Android Project Files</h2> + + <p>Android Studio project files and settings provide project-wide settings that apply across all + modules in the project. </p> + + <dl> + <dt><code>.idea</code></dt> + + <dd>Directory for IntelliJ IDEA settings.</dd> + + + <dt><code>app</code></dt> + + <dd>Application module directories and files. </dd> + + + <dt><code>build</code></dt> + + <dd>This directory stories the build output for all project modules.</dd> + + + <dt><code>gradle</code></dt> + + <dd>Contains the gradler-wrapper files. </dd> + + + <dt><code>.gitignore</code></dt> + + <dd>Specifies the untracked files that Git should ignore.</dd> + + + <dt><code>build.gradle</code></dt> + + <dd>Customizable properties for the build system. You can edit this file to specify the default + build settings used by the application modules and also set the location of your keystore and key alias + so that the build tools can sign your application when building in release mode. This file is + integral to the project, so maintain it in a source revision control system. </dd> + + <dt><code>gradle.properties</code></dt> + + <dd>Project-wide Gradle settings.</dd> + + + <dt><code>gradlew</code></dt> + + <dd>Gradle startup script for Unix.</dd> + + + <dt><code>gradlew.bat</code></dt> + + <dd>Gradle startup script for Windows. </dd> + + <dt><code>local.properties</code></dt> + + <dd>Customizable computer-specific properties for the build system, such as the path to the SDK + installation. Because the content of the file is specific to the local installation of the SDK, + the <code>local.properties</code> should not be maintained in a source revision control system. </dd> - <p>Android projects are the projects that eventually get built into an <code>.apk</code> file that you install - onto a device. They contain things such as application source code and resource files. - Some are generated for you by default, while others should be created if - required. The following directories and files comprise an Android project:</p> + + <dt><code><project>.iml</code></dt> + + <dd>Module file created by the IntelliJ IDEA to store module information.</dd> + + <dt><code>settings.gradle</code></dt> + + <dd>Specifies the sub-projects to build.</dd> + + </dl> + + + <h2 id="ApplicationModules">Android Application Modules</h2> + + <p>Android Application Modules are the modules that eventually get built into the <code>.apk</code> + files based on your build settings. They contain things such as application source code and resource + files. Most code and resource files are generated for you by default, while others should be created if + required. The following directories and files comprise an Android application module:</p> <dl> + + <dt><code>build/</code></dt> + + <dd>Contains build folders for the specified build variants. Stored in the main application module.</dd> + + + <dt><code>libs/</code></dt> + + <dd>Contains private libraries. Stored in the main application module.</dd> + + + + <dt><code>src/</code></dt> <dd>Contains your stub Activity file, which is stored at - <code>src<em>/your/package/namespace/ActivityName</em>.java</code>. All other source code - files (such as <code>.java</code> or <code>.aidl</code> files) go here as well.</dd> + <code>src<em>/main/java/<namespace.applicationname>/ActivityName></em>.java</code>. All other source + code files (such as <code>.java</code> or <code>.aidl</code> files) go here as well.</dd> - <dt><code>bin/</code></dt> + <dl> + <dt><code>androidTest/</code></dt> - <dd>Output directory of the build. This is where you can find the final <code>.apk</code> file and other - compiled resources.</dd> + <dd>Contains the instrumentation tests. For more information, see the + <a href="{@docRoot}tools/testing/index.html">Android Test documentation</a>.</dd> - <dt><code>jni/</code></dt> + <dt><code>main/java/com.>project<.>app<</code></dt> - <dd>Contains native code sources developed using the Android NDK. For more information, see the - <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK documentation</a>.</dd> + <dd>Contains Java code source for the app activities.</dd> - <dt><code>gen/</code></dt> + <dt><code>main/jni/</code></dt> - <dd>Contains the Java files generated by ADT, such as your <code>R.java</code> file and - interfaces created from AIDL files.</dd> + <dd>Contains native code using the Java Native Interface (JNI). For more information, see the + <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK documentation</a>.</dd> - <dt><code>assets/</code></dt> + <dt><code>main/gen/</code></dt> - <dd>This is empty. You can use it to store raw asset files. Files that you save here are - compiled into an <code>.apk</code> file as-is, and the original filename is preserved. You can navigate this - directory in the same way as a typical file system using URIs and read files as a stream of - bytes using the {@link android.content.res.AssetManager}. For example, this is a good - location for textures and game data.</dd> + <dd>Contains the Java files generated by Android Studio, such as your <code>R.java</code> file and + interfaces created from AIDL files.</dd> - <dt><code>res/</code></dt> + <dt><code>main/assets/</code></dt> - <dd> - Contains application resources, such as drawable files, layout files, and string values. See - <a href="{@docRoot}guide/topics/resources/index.html">Application Resources</a> for more - information. + <dd>This is empty. You can use it to store raw asset files. Files that you save here are + compiled into an <code>.apk</code> file as-is, and the original filename is preserved. You can + navigate this directory in the same way as a typical file system using URIs and read files as a + stream of bytes using the {@link android.content.res.AssetManager}. For example, this is a good + location for textures and game data.</dd> - <dl> - <dt><code>anim/</code></dt> + <dt><code>main/res/</code></dt> - <dd>For XML files that are compiled into animation objects. See the <a href= - "{@docRoot}guide/topics/resources/animation-resource.html">Animation</a> resource - type.</dd> + <dd>Contains application resources, such as drawable files, layout files, and string values + in the following directories. See + <a href="{@docRoot}guide/topics/resources/index.html">Application Resources</a> for more + information. - <dt><code>color/</code></dt> + <dl> + <dt><code>anim/</code></dt> - <dd>For XML files that describe colors. See the <a href= - "{@docRoot}guide/topics/resources/color-list-resource.html">Color Values</a> resource - type.</dd> + <dd>For XML files that are compiled into animation objects. See the <a href= + "{@docRoot}guide/topics/resources/animation-resource.html">Animation</a> resource + type.</dd> - <dt><code>drawable/</code></dt> + <dt><code>color/</code></dt> - <dd>For bitmap files (PNG, JPEG, or GIF), 9-Patch image files, and XML files that describe - Drawable shapes or Drawable objects that contain multiple states (normal, pressed, or - focused). See the <a href= - "{@docRoot}guide/topics/resources/drawable-resource.html">Drawable</a> resource type.</dd> + <dd>For XML files that describe colors. See the <a href= + " {@docRoot}guide/topics/resources/color-list-resource.html">Color Values</a> resource + type.</dd> - <dt><code>layout/</code></dt> + <dt><code>drawable/</code></dt> - <dd>XML files that are compiled into screen layouts (or part of a screen). See the <a href= - "{@docRoot}guide/topics/resources/layout-resource.html">Layout</a> resource type.</dd> + <dd>For bitmap files (PNG, JPEG, or GIF), 9-Patch image files, and XML files that describe + Drawable shapes or Drawable objects that contain multiple states (normal, pressed, or + focused). See the <a href= + "{@docRoot}guide/topics/resources/drawable-resource.html">Drawable</a> resource type.</dd> - <dt><code>menu/</code></dt> + <dt><code>layout/</code></dt> - <dd>For XML files that define application menus. - See the <a href="{@docRoot}guide/topics/resources/menu-resource.html">Menus</a> - resource type.</dd> + <dd>XML files that are compiled into screen layouts (or part of a screen). See the <a href= + "{@docRoot}guide/topics/resources/layout-resource.html">Layout</a> resource type.</dd> - <dt><code>raw/</code></dt> + <dt><code>menu/</code></dt> - <dd>For arbitrary raw asset files. Saving asset files here instead of in the - <code>assets/</code> directory only differs in the way that you access them. These files - are processed by aapt and must be referenced from the application using a resource - identifier in the {@code R} class. For example, this is a good place for media, such as MP3 - or Ogg files.</dd> + <dd>For XML files that define application menus. + See the <a href="{@docRoot}guide/topics/resources/menu-resource.html">Menus</a> + resource type.</dd> - <dt><code>values/</code></dt> + <dt><code>raw/</code></dt> - <dd>For XML files that are compiled into many kinds of resource. Unlike other resources in - the <code>res/</code> directory, resources written to XML files in this folder are not - referenced by the file name. Instead, the XML element type controls how the resources is - defined within them are placed into the {@code R} class.</dd> + <dd>For arbitrary raw asset files. Saving asset files here is essentially the same as + saving them in the <code>assets/</code> directory. The only difference is how you + access them. These files + are processed by aapt and must be referenced from the application using a resource + identifier in the {@code R} class. For example, this is a good place for media, such as MP3 + or Ogg files.</dd> - <dt><code>xml/</code></dt> + <dt><code>values/</code></dt> - <dd>For miscellaneous XML files that configure application components. For example, an XML - file that defines a {@link android.preference.PreferenceScreen}, {@link - android.appwidget.AppWidgetProviderInfo}, or <a href= - "{@docRoot}reference/android/app/SearchManager.html#SearchabilityMetadata">Searchability - Metadata</a>. See <a href="{@docRoot}guide/topics/resources/index.html">Application Resources</a> - for more information about configuring these application components.</dd> - </dl> - </dd> + <dd>For XML files that define resources by XML element type. Unlike other resources in + the <code>res/</code> directory, resources written to XML files in this folder are not + referenced by the file name. Instead, the XML element type controls how the resources + defined within the XML files are placed into the {@code R} class.</dd> - <dt><code>libs/</code></dt> + <dt><code>xml/</code></dt> + + <dd>For miscellaneous XML files that configure application components. For example, an XML + file that defines a {@link android.preference.PreferenceScreen}, {@link + android.appwidget.AppWidgetProviderInfo}, or + <a href="{@docRoot}reference/android/app/SearchManager.html#SearchabilityMetadata"> + Searchability Metadata</a>. See + <a href="{@docRoot}guide/topics/resources/index.html">Application Resources</a> + for more information about configuring these application components.</dd> + + </dl> - <dd>Contains private libraries.</dd> + <dt><code>AndroidManifest.xml</code></dt> - <dt><code>AndroidManifest.xml</code></dt> + <dd>The control file that describes the nature of the application and each of its components. + For instance, it describes: certain qualities about the activities, services, intent receivers, + and content providers; what permissions are requested; what external libraries are needed; what + device features are required, what API Levels are supported or required; and others. See the + <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">AndroidManifest.xml</a> + documentation for more information</dd> - <dd>The control file that describes the nature of the application and each of its components. - For instance, it describes: certain qualities about the activities, services, intent receivers, - and content providers; what permissions are requested; what external libraries are needed; what - device features are required, what API Levels are supported or required; and others. See the - <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">AndroidManifest.xml</a> - documentation for more information</dd> + </dl> - <dt><code>project.properties</code></dt> + <dt><code>.gitignore/</code></dt> - <dd>This file contains project settings, such as the build target. This file is integral to - the project, so maintain it in a source revision control system. To edit project - properties in Eclipse, right-click the project folder and select - <strong>Properties</strong>.</dd> + <dd>Specifies the untracked files ignored by git.</dd> - <dt><code>local.properties</code></dt> + <dt><code>app.iml/</code></dt> - <dd>Customizable computer-specific properties for the build system. If you use Ant to build - the project, this contains the path to the SDK installation. Because the content of the file - is specific to the local installation of the SDK, the <code>local.properties</code> should not -be maintained in a source revision control system. If you use Eclipse, this file is not -used.</dd> + <dd>IntelliJ IDEA module</dd> - <dt><code>ant.properties</code></dt> + <dt><code>build.gradle</code></dt> - <dd>Customizable properties for the build system. You can edit this file to override default - build settings used by Ant and also provide the location of your keystore and key alias so that - the build tools can sign your application when building in release mode. This file is integral - to the project, so maintain it in a source revision control system. If you use Eclipse, this - file is not used.</dd> + <dd>Customizable properties for the build system. You can edit this file to override default + build settings used by the manifest file and also set the location of your keystore and key alias + so that the build tools can sign your application when building in release mode. This file is + integral to the project, so maintain it in a source revision control system. </dd> - <dt><code>build.xml</code></dt> + <dt><code>proguard-rules.pro</code></dt> + + <dd>ProGuard settings file. </dd> - <dd>The Ant build file for your project. This is only applicable for projects that - you build with Ant.</dd> </dl> - <h2 id="LibraryProjects">Library Projects</h2> + + + <h2 id="LibraryModules">Library Module</h2> <div class="sidebox-wrapper"> <div class="sidebox"> - <h2>Library project example code</h2> + <h2>Library module example code</h2> - <p>The SDK includes an example application called <code>TicTacToeMain</code> that shows how a dependent - application can use code and resources from an Android Library project. The TicTacToeMain - application uses code and resources from an example library project called TicTacToeLib.</p> + <p>The SDK includes an example application called <code>TicTacToeMain</code> that shows how a + dependent application can use code and resources from an Android Library module. The TicTacToeMain + application uses code and resources from an example library module called TicTacToeLib.</p> - <p>To download the sample applications and run them as projects in + <p>To download the sample applications and run them as modules in your environment, use the <em>Android SDK Manager</em> to download the "Samples for - SDK API 8" (or later) package into your SDK.</p> + SDK API 8" (or later) module into your SDK.</p> <p>For more information and to browse the code of the samples, see the <a href="{@docRoot}resources/samples/TicTacToeMain/index.html">TicTacToeMain @@ -218,76 +324,76 @@ used.</dd> </div> </div> - <p>An Android <em>library project</em> is a development project that holds shared Android - source code and resources. Other Android application projects can reference the library project + <p>An Android <em>library module</em> is a development module that holds shared Android + source code and resources. Other Android application modules can reference the library module and, at build time, include its compiled sources in their <code>.apk</code> files. Multiple - application projects can reference the same library project and any single application project - can reference multiple library projects.</p> + application modules can reference the same library module and any single application module + can reference multiple library modules.</p> <p class="note"><strong>Note:</strong> You need SDK Tools r14 or newer to use the new library - project feature that generates each library project into its own JAR file. + module feature that generates each library module into its own JAR file. You can download the tools and platforms using the <em>Android SDK Manager</em>, as described in <a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a>.</p> <p>If you have source code and resources that are common to multiple Android projects, you - can move them to a library project so that it is easier to maintain across applications and - versions. Here are some common scenarios in which you could make use of library projects:</p> + can move them to a library module so that it is easier to maintain across applications and + versions. Here are some common scenarios in which you could make use of library modules:</p> <ul> <li>If you are developing multiple related applications that use some of the same components, - you move the redundant components out of their respective application projects and create a - single, reuseable set of the same components in a library project.</li> + you move the redundant components out of their respective application module and create a + single, reusable set of the same components in a library module.</li> <li>If you are creating an application that exists in both free and paid versions. You move - the part of the application that is common to both versions into a library project. The two - dependent projects, with their different package names, will reference the library project + the part of the application that is common to both versions into a library module. The two + dependent modules, with their different package names, will reference the library module and provide only the difference between the two application versions.</li> </ul> - <p>Structurally, a library project is similar to a standard Android application project. For - example, it includes a manifest file at the project root, as well as <code>src/</code>, - <code>res/</code> and similar directories. The project can contain the same types of source - code and resources as a standard Android project, stored in the same way. For example, source - code in the library project can access its own resources through its <code>R</code> class.</p> + <p>Structurally, a library module is similar to a standard Android application module. For + example, it includes a manifest file at the module root, as well as <code>src/</code>, + <code>res/</code> and similar directories. The module can contain the same types of source + code and resources as a standard Android module, stored in the same way. For example, source + code in the library module can access its own resources through its <code>R</code> class.</p> - <p>However, a library project differs from a standard Android application project in that you + <p>However, a library module differs from a standard Android application module in that you cannot compile it directly to its own <code>.apk</code> and run it on an Android device. - Similarly, you cannot export the library project to a self-contained JAR file, as you would do + Similarly, you cannot export the library module to a self-contained JAR file, as you would do for a true library. Instead, you must compile the library indirectly, by referencing the library in the dependent application and building that application.</p> - <p>When you build an application that depends on a library project, the SDK tools compile the - library into a temporary JAR file and uses it in the main project, then uses the + <p>When you build an application that depends on a library module, the SDK tools compile the + library into a temporary JAR file and use it in the main module, then uses the result to generate the <code>.apk</code>. In cases where a resource ID is defined in both the application and the library, the tools ensure that the resource declared in the application gets - priority and that the resource in the library project is not compiled into the application + priority and that the resource in the library module is not compiled into the application <code>.apk</code>. This gives your application the flexibility to either use or redefine any resource behaviors or values that are defined in any library.</p> <p>To organize your code further, your application can add references to multiple library - projects, then specify the relative priority of the resources in each library. This lets you + modules, then specify the relative priority of the resources in each library. This lets you build up the resources actually used in your application in a cumulative manner. When two libraries referenced from an application define the same resource ID, the tools select the resource from the library with higher priority and discard the other.</p> - <p>Once you have added references to library projects to your Android project, + <p>Once you have added references to library modules to your Android application module, you can set their relative priority. At build time, the libraries are merged with the application one at a time, starting from the lowest priority to the highest.</p> - <p>Library projects can reference other library projects and can import an external library - (JAR) in the normal way.</p> + <p>Library modules can reference other library modules and can import an external library + (JAR) in the normal way.</p> <h3 id="considerations">Development considerations</h3> - <p>As you develop your library project and dependent applications, keep the points listed below + <p>As you develop your library modules and dependent applications, keep the points listed below in mind:</p> <ul> <li><p><strong>Resource conflicts</strong></p> - <p>Since the tools merge the resources of a library project with those of a dependent application - project, a given resource ID might be defined in both projects. In this case, the tools select + <p>Since the tools merge the resources of a library module with those of a dependent application + module, a given resource ID might be defined in both modules. In this case, the tools select the resource from the application, or the library with highest priority, and discard the other resource. As you develop your applications, be aware that common resource IDs are likely to be defined in more than one project and will be merged, with the resource from the application or @@ -297,67 +403,65 @@ used.</dd> <li><p><strong>Use prefixes to avoid resource conflicts</strong></p> <p>To avoid resource conflicts for common resource IDs, consider using a prefix or other - consistent naming scheme that is unique to the project (or is unique across all projects).</p></li> + consistent naming scheme that is unique to the module (or is unique across all project modules).</p></li> - <li><p><strong>You cannot export a library project to a JAR file</strong></p> + <li><p><strong>You cannot export a library module to a JAR file</strong></p> - <p>A library cannot be distributed as a binary file (such as a JAR file). This will -be added in a future - version of the SDK Tools.</p></li> + <p>A library cannot be distributed as a binary file (such as a JAR file). This will be added in a + future version of the SDK Tools.</p></li> - <li><p><strong>A library project can include a JAR library</strong></p> + <li><p><strong>A library module can include a JAR library</strong></p> - <p>You can develop a library project that itself includes a JAR library, however you need to - manually edit the dependent application project's build path and add a path to the JAR file.</p></li> + <p>You can develop a library module that itself includes a JAR library; however you need to + manually edit the dependent application modules's build path and add a path to the JAR file.</p></li> - <li><p><strong>A library project can depend on an external JAR library</strong></p> + <li><p><strong>A library module can depend on an external JAR library</strong></p> - <p>You can develop a library project that depends on an external library (for example, the Maps + <p>You can develop a library module that depends on an external library (for example, the Maps external library). In this case, the dependent application must build against a target that includes the external library (for example, the Google APIs Add-On). Note also that both the - library project and the dependent application must declare the external library in their manifest + library module and the dependent application must declare the external library in their manifest files, in a <a href= "{@docRoot}guide/topics/manifest/uses-library-element.html"><code><uses-library></code></a> element.</p></li> - <li> <p><strong>Library projects cannot include raw assets</strong></p> + <li> <p><strong>Library modules cannot include raw assets</strong></p> <p>The tools do not support the use of raw asset files (saved in the <code>assets/</code> directory) - in a library project. Any asset resources + in a library module. Any asset resources used by an application must be stored in the <code>assets/</code> directory of the application - project itself. However, resource files saved in the - <code>res/</code> directory are supported.</p></li> + module itself. However, resource files saved in the <code>res/</code> directory are supported.</p></li> - <li><p><strong>Platform version must be lower than or equal to the Android project</strong></p> + <li><p><strong>Platform version must be lower than or equal to the Android module</strong></p> - <p>A library is compiled as part of the dependent application project, so the API used in the - library project must be compatible with the version of the Android library used to compile the - application project. In general, the library project should use an <a href= + <p>A library is compiled as part of the dependent application module, so the API used in the + library module must be compatible with the version of the Android library used to compile the + application module. In general, the library module should use an <a href= "{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level</a> that is the same as — or lower - than — that used by the application. If the library project uses an API level that is - higher than that of the application, the application project will not compile. It is + than — that used by the application. If the library module uses an API level that is + higher than that of the application, the application module will not compile. It is perfectly acceptable to have a library that uses the Android 1.5 API (API level 3) and that is - used in an Android 1.6 (API level 4) or Android 2.1 (API level 7) project, for instance.</p></li> + used in an Android 1.6 (API level 4) or Android 2.1 (API level 7) module, for instance.</p></li> - <li> <p><strong>No restriction on library package names</strong></p> + <li> <p><strong>No restriction on library module names</strong></p> <p>There is no requirement for the package name of a library to be the same as that of applications that use it.</p></li> - <li><p><strong>Each library project creates its own R class </strong></p> + <li><p><strong>Each library module creates its own R class </strong></p> - <p>When you build the dependent application project, library projects are compiled and - merged with the application project. Each library has its own <code>R</code> class, named according + <p>When you build the dependent application modules, library modules are compiled and + merged with the application module. Each library has its own <code>R</code> class, named according to the library's package name. The <code>R</code> class generated from main - project and the library project is created in all the packages that are needed including the main - project's package and the libraries' packages.</p></li> + module and the library module is created in all the packages that are needed including the main + module's package and the libraries' packages.</p></li> - <li><p><strong>Library project storage location</strong></p> + <li><p><strong>Library module storage location</strong></p> - <p>There are no specific requirements on where you should store a library project, relative to a - dependent application project, as long as the application project can reference the library - project by a relative link. What is important is that the main - project can reference the library project through a relative link.</p></li> + <p>There are no specific requirements on where you should store a library module, relative to a + dependent application module, as long as the application module can reference the library + module by a relative link. What is important is that the main + module can reference the library module through a relative link.</p></li> </ul> <h2 id="TestProjects">Test Projects</h2> @@ -365,82 +469,55 @@ be added in a future <p>Test projects contain Android applications that you write using the <a href="{@docRoot}tools/testing/index.html">Testing and Instrumentation framework</a>. The framework is an extension of the JUnit test framework and adds - access to Android system objects. The file structure of a test project is the same as an - Android project.</p> - - <dl> - <dt><code>src/</code></dt> + access to Android system objects. </p> - <dd>Includes your test source files. Test projects do not require an Activity <code>.java</code> - file, but can include one.</dd> + <p>The test projects are now automatically part of the app source folder. When a new application + module is created, Android Studio creates the <code>src/androidTest</code> source set. This + source set contains tests for the default configuration and is combined with the <em>debug</em> + build type to generate a test application. </p> - <dt><code>gen/</code></dt> + <img src="{@docRoot}images/tools/studio-androidtest-folder.png"> + <p class="img-caption"><strong>Figure 1.</strong> androidTest Folder.</p> - <dd>This contains the Java files generated by ADT, such as your <code>R.java</code> file and - interfaces created from AIDL files.</dd> + <p class="note"><strong>Note:</strong> The <code>src/androidTest</code> source set may not be + created for every type of available module template. If this source set is not created, you + can just create it for that module.</p> - <dt><code>assets/</code></dt> + <p>For each product flavor, create a test folder specific to that product flavor. </p> - <dd>This is empty. You can use it to store raw asset files.</dd> - - <dt><code>res/</code></dt> - - <dd>A folder for your application resources, such as drawable files, layout files, string - values, etc. See <a href="{@docRoot}guide/topics/resources/index.html">Application - Resources</a>.</dd> - - <dt><code>AndroidManifest.xml</code></dt> - - <dd>The Android Manifest for your project. See <a href= - "{@docRoot}guide/topics/manifest/manifest-intro.html">The AndroidManifest.xml File</a>. Test - Projects have a special <a href= - "{@docRoot}guide/topics/manifest/instrumentation-element.html"> - <code><instrumentation></code></a> - element that connects the test project with the application project.</dd> - - <dt><code>project.properties</code></dt> - - <dd>This file contains project settings, such as the build target and links to the project being -tested. This file is integral to the project, so maintain it in a source -revision control system. To edit project properties in Eclipse, right-click the project folder -and select <strong>Properties</strong>.</dd> + <dl> + <dt><code>src/main/</code></dt> + <dd><code>src/androidTest/</code></dt> - <dt><code>local.properties</code></dt> + <dt><code>src/productFlavor1/</code></dt> + <dd><code>src/testproductFlavor1/</code></dd> - <dd>Customizable computer-specific properties for the build system. If you use Ant to build - the project, this contains the path to the SDK installation. Because the content of the file - is specific to the local installation of the SDK, it should not be maintained in a Source - Revision Control system. If you use Eclipse, this file is not used.</dd> + <dt><code>src/productFlavor2/</code></dt> + <dd><code>src/testproductFlavor2/</code></dd> - <dt><code>ant.properties</code></dt> + </dl> - <dd>Customizable properties for the build system. You can edit this file to override default - build settings used by Ant and provide the location to your keystore and key alias, so that the - build tools can sign your application when building in release mode. This file is integral to - the project, so maintain it in a source revision control system. - If you use Eclipse, this file is not used.</dd> + <p>The test manifests are always generated so a manifest in a test source set is optional.</p> - <dt><code>build.xml</code></dt> + <p>The test applications run against the <em>debug</em> build type. This can be configured + using the <code>testBuildType</code> property in the build file.</p> - <dd>The Ant build file for your project. This is only applicable for projects that - you build with Ant.</dd> - </dl> - <p>For more information, see the <a href= - "{@docRoot}tools/testing/index.html">Testing</a> section.</p> + <p>For more information, see the + <a href="{@docRoot}tools/testing/index.html">Testing</a> section.</p> - <h2 id="testing">Testing a Library Project</h2> + <h2 id="testing">Testing a Library Module</h2> <p>There are two recommended ways of setting up testing on code and resources in a library - project:</p> + module:</p> <ul> <li>You can set up a <a href="{@docRoot}tools/testing/testing_otheride.html">test - project</a> that instruments an application project that depends on the library project. You - can then add tests to the project for library-specific features.</li> + module</a> that instruments an application module that depends on the library module. You + can then add tests to the module for library-specific features.</li> - <li>You can set up a standard application project that depends on the library and put - the instrumentation in that project. This lets you create a self-contained project that + <li>You can set up a standard application module that depends on the library and put + the instrumentation in that module. This lets you create a self-contained module that contains both the tests/instrumentations and the code to test.</li> </ul> diff --git a/docs/html/tools/projects/projects-cmdline.jd b/docs/html/tools/projects/projects-cmdline.jd index 29d0e57..f0830fe 100644 --- a/docs/html/tools/projects/projects-cmdline.jd +++ b/docs/html/tools/projects/projects-cmdline.jd @@ -118,7 +118,7 @@ android create project \ <h2 id="UpdatingAProject">Updating a Project</h2> - <p>If you're upgrading a project from an older version of the Android SDK or want to create a new + <p>If you're up grading a project from an older version of the Android SDK or want to create a new project from existing code, use the <code>android update project</code> command to update the project to the new development environment. You can also use this command to revise the build target of an existing project (with the <code>--target</code> option) and the project name (with @@ -288,7 +288,7 @@ android.library.reference.1=path/to/library_projectC <h3 id="depAppBuild">Building a dependent application</h3> <p>To build an application project that depends on one or more library projects, you can use the - standard Ant build commands and compile modes, as described in <a href= + standard Gradle build commands and compile modes, as described in <a href= "{@docRoot}tools/building/index.html">Building and Running</a>. The tools compile and merge all libraries referenced by the application as part of compiling the dependent application project. No additional commands or steps are necessary.</p> diff --git a/docs/html/tools/projects/projects-studio.jd b/docs/html/tools/projects/projects-studio.jd new file mode 100644 index 0000000..5082537 --- /dev/null +++ b/docs/html/tools/projects/projects-studio.jd @@ -0,0 +1,398 @@ +page.title=Managing Projects from Android Studio + +@jd:body + + <div id="qv-wrapper"> + <div id="qv"> + <h2>In this document</h2> + + <ol> + <li><a href="#CreatingAProject">Creating an Android Project</a></li> + <ol> + <li><a href="#Step1CreatingAProject">Create a New Project</a> </li> + <li><a href="#Step2SelectFormFactor">Select Form Factors and API Level</a> </li> + <li><a href="#Step3AddActivity">Add an Activity</a> </li> + <li><a href="#Step4ConfigureActivity">Configure Your App</a> </li> + <li><a href="#Step5DevelopYourApp">Develop Your App</a> </li> + </ol> + + <li><a href="#CreatingAModule">Creating an Android Module</a></li> + + <li><a href="#SettingUpLibraryModule">Setting up a Library Module</a></li> + + <li><a href="#ReferencingLibraryModule">Referencing a Library Module</a></li> + + <li><a href="#ReferencingAppEngModule">Setting up an App Eng Module</a></li> + + <li><a href="#ProjectView">Using the Android Project View</a></li> + + </ol> + + </div> + </div> + + +<p>Android Studio provides graphical tools for creating and managing Android projects, which +contain everything that define your Android apps, from app source code to build configurations and +test code. Each project contains one or more different types of modules, such as + application modules, library modules, and test modules.</p> + +<p>This guide explains how to create Android projects and different modules using +<a href="{@docRoot}tools/studio/index.html">Android Studio</a>. +For more information about the Android project structure and module types, read <a href= +"{@docRoot}tools/projects/index.html">Managing Projects Overview</a>.</p> + + + +<h2 id="CreatingAProject">Creating an Android Project</h2> + +<p>Android Studio makes it easy to create Android apps for several form factors, such as phone, +tablet, TV, Wear, and Google Glass. The <em>New Project</em> wizard lets you choose the form factors +for your app and populates the project structure with everything you need to get started.</p> + +<p>Follow the steps in this section to create a project in Android Studio.</p> + +<h3 id="Step1CreatingAProject">Step 1: Create a New Project</h2> + +<p>If you didn't have a project opened, Android Studio shows the Welcome screen. +To create a new project, click <strong>New Project</strong>.</p> + +<p>If you had a project opened, Android Studio shows the development environment. +To create a new project, click <strong>File</strong> > <strong>New Project</strong>.</p> + +<p>The next window lets you configure the name of your app, the package name, and the location +of your project.</p> + +<img src="{@docRoot}images/tools/wizard2.png" alt="" width="500" height="381"> +<p class="img-caption"><strong>Figure 1.</strong> Choose a name for your project.</p> + +<p>Enter the values for your project then click <strong>Next</strong>.</p> + +<h3 id="Step2SelectFormFactor">Step 2: Select Form Factors and API Level</h2> + +<p>The next window lets you select the form factors supported by your app, such as phone, tablet, +TV, Wear, and Google Glass. The selected form factors become the application modules witin the +project. For each form factor, you can also select the API Level for that app. To get more information, +click <strong>Help me choose</strong>.</p> + +<img src="{@docRoot}images/tools/wizard4.png" alt="" width="750" height="510"> +<p class="img-caption"><strong>Figure 2.</strong> Select the API Level.</p> + +<p>The API Level window shows the distribution of mobile devices running each version of Android, +as shown in figure 3. Click on an API level to see a list of features introduced in the corresponding +version of Android. This helps you choose the minimum API Level that has all the features that +your apps needs, so you can reach as many devices as possible. Then click <strong>OK</strong>.</p> + +<img src="{@docRoot}images/tools/wizard3.png" alt="" width="500" height="480"> +<p class="img-caption"><strong>Figure 3.</strong> Choose form factors for your app.</p> + +<p>Then, on the Form Factors Window, click <strong>Next</strong>.</p> + + +<h3 id="Step3AddActivity">Step 3: Add an Activity</h2> + +<p>The next screen lets you select an activity type to add to your app, as shown in figure 4. +This screen displays a different set of activities for each of the form factors you selected earlier.</p> + +<img src="{@docRoot}images/tools/wizard5.png" alt="" width="720" height="504"> +<p class="img-caption"><strong>Figure 4.</strong> Add an activity to your app.</p> + +<p>Choose an activity type then click <strong>Next</strong>.</p> + + <p class="note"><strong>Note:</strong> If you choose "Add No Activity", click <strong>Finish</strong> + to create the project.</p> + + +<h3 id="Step4ConfigureActivity">Step 4: Configure Your Activity</h2> + +<p>The next screen lets you configure the activity to add to your app, as shown in figure 5.</p> + +<img src="{@docRoot}images/tools/wizard6.png" alt="" width="450" height="385"> +<p class="img-caption"><strong>Figure 5.</strong> Choose a name for your activity.</p> + +<p>Enter the activity name, the layout name, and the activity title. Then click +<strong>Finish</strong>.</p> + + +<h3 id="Step5DevelopYourApp">Step 5: Develop Your App</h2> + +<p>Android Studio creates the default structure for your project and opens the development +environment. If your app supports more than one form factor, Android Studio creates a module folder +with complete source files for each of them as shown in figure 6.</p> + +<img src="{@docRoot}images/tools/wizard7.png" alt="" width="750" height="509"> +<p class="img-caption"><strong>Figure 6.</strong> The default project structure for a mobile app.</p> + +<p>Now you are ready to develop your app. For more information, see the following links:</p> + +<ul> +<li><a href="{@docRoot}training/">Training Lessons</a></li> +<li><a href="{@docRoot}training/building-wearables.html">Building Apps for Wearables</a></li> +<li><a href="{@docRoot}tv/">Android TV</a></li> +<li><a href="https://developers.google.com/glass/">Google Glass</a></li> +</ul> + + + <h2 id="CreatingAModule">Creating an Android Module</h2> + + <p>Android application modules contain the <code>src/main/</code>, <code>AndroidManifest.xml</code>, + <code>build.gradle</code>, build output and other files you need to generate your app's APK files. + Android Studio provides a <em>New Module Wizard</em> that you can use to quickly create a new + Android module (or a module from existing code) based on selected application settings, such as + minimum SDK level and activity template.</p> + + <p>To create a new module, select <strong>File</strong> > <strong>New</strong> > + <strong>Module</strong>. Select the desire module type then click Next to enter the basic module + settings:</p> + + <ul> + <li>Enter an <strong>Application Name</strong>. This name is used as the title of your + application launcher icon when it is installed on a device.</li> + + <li>Enter a <strong>Module Name</strong>. This text is used as the name of the folder where + your Java-based activity files are stored.</li> + + <li>Enter a <strong>Package Name</strong> and <strong>Package Location</strong>. This class + package namespace creates the initial + package structure for your applications code files and is added as the + <a href="{@docRoot}guide/topics/manifest/manifest-element.html#package">{@code package}</a> + attribute in your application's + <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">Android manifest file</a>. + This manifest value serves as the unique identifier for your application app when you + distribute it to users. The package name must follow the same rules as packages in the Java + programming language.</li> + + <li>Select the <strong>Minimum required SDK</strong>. + This setting indicates the lowest version of the Android platform that your application + supports for the selected form factor. This value sets the + <code>minSdkVersion</code> attribute in the build.gradle file.</li> + + <p class="note"><strong>Note:</strong> You can manually change the minimum and target SDK + for your module at any time: Double-click the module's build.gradle in the Project Explorer, + set the <strong>targetSdkVersion</strong> and <em>targetSdkVersion</em> in the + <em>defaultConfig</em> section.</p> + + + <li>Select a <strong>Target SDK</strong>. This setting indicates the highest version of + Android with which you have tested with your application and sets the + <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code + targetSdkVersion}</a> attribute in your application's' build.gradle file. + + + <li>Select a <strong>Compile With</strong> API version. This setting specifies what version + of the SDK to compile your project against. We strongly recommend using the most recent + version of the API.</li> + + <li>Select a <strong>Language Level</strong> API version. This setting specifies what version + of the SDK to compile your project against. We strongly recommend using the most recent + version of the API.</li> + + <li>Select a <strong>Theme</strong>. This setting specifies which standard Android + <a href="{@docRoot}design/style/themes.html">visual style</a> is applied to your + application. Select activity template. For more information about Android code templates, see + <a href="{@docRoot}tools/projects/templates.html">Using Code Templates</a>Leave the <strong> + Create activity</strong> option checked so you can start your + application with some essential components. </li> + + <li>Click the check box for the required Support Libraries then click <strong>Next</strong>.</li> + + <li>In the <strong>Configure Launcher Icon</strong> page, create an icon and options, then click + <strong>Next</strong>.</li> + + <li>In the <strong>Create Activity</strong> page, select activity template then click + <strong>Next</strong>. For more information about Android code templates, see + <a href="{@docRoot}tools/projects/templates.html">Using Code Templates</a>. + </li> + + <li>Review the new module settings then click <strong>Finish</strong>.</li> + + </ul> + + <p>The wizard creates a new Android application module according to the options you have chosen.</p> + + + + <h2 id="SettingUpLibraryModule">Setting up a Library Module</h2> + + <p>A library module is a standard Android module, so you can create a new one in the same way + as you would a new application module, using the New Module wizard and selecting <em>Android + Library</em> as the module type. The created library module will appear in your project view + along with the other modules. </p> + + <p> You can easily change an existing application module to a library module by changing the + plugin assignment in the <strong>build.gradle</strong> file to <em>com.android.libary</em>.</p> + +<pre> +apply plugin: 'com.android.application' + +android {...} +</pre> + +<pre> +apply plugin: 'com.android.library' + +android {...} +</pre> + + + <h3>Adding a dependency on a library module</h3> + + <p>The library dependency can be declared in the module's manifest file or in the + <strong<build.gradle</strong> file. </p> + + <p>A library modules's manifest file must declare all of the shared components that it includes, + just as would a standard Android application. For more information, see the documentation for + <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">AndroidManifest.xml</a>.</p> + + <p>For example, the <a href= + "{@docRoot}resources/samples/TicTacToeLib/AndroidManifest.html">TicTacToeLib</a> example library + project declares the activity <code>GameActivity</code>:</p> + <pre> +<manifest> + ... + <application> + ... + <activity android:name="GameActivity" /> + ... + </application> +</manifest> +</pre> + + +<p>To add the dependency declaration to the build file, edit the build file for the <code>app</code> +module (<code>app/build.gradle</code>) and add a dependency on the <code>lib</code> module:</p> + +<pre> +... +dependencies { + ... + compile project(":lib") +} +</pre> + +<p>In this example, the <code>lib</code> module can still be built and tested independently, and +the build system creates an AAR package for it that you could reuse in other projects.</p> + +<p class="note"><strong>Note:</strong> The library settings in the <code>app/build.gradle</code> +file will override any shared library resources declared in the manifest file.</p> + + + <h2 id="ReferencingLibraryModule">Referencing a library module</h2> + + <p>If you are developing an application and want to include the shared code or resources from a + library module, you can also do so easily by adding a reference to the library module in the + module's dependency page.</p> + + <p>To add a reference to a library module, follow these steps:</p> + + <ol> + <li>Make sure that both the module library and the application module that depends on it are + in your proejct. If one of the modules is missing, import it into your project.</li> + + <li>In the project view, right-click the dependent module and select + <strong>Open</strong> > <strong>Module Settings</strong>.</li> + + <li>Right-click the plus icon to add a new dependencies. + <p>If you are adding references to multiple libraries, you can set their relative + priority (and merge order) by selecting a library and using the <strong>Up</strong> and + <strong>Down</strong> controls. The tools merge the referenced libraries with your application + starting from lowest priority (bottom of the list) to highest (top of the list). If more than one + library defines the same resource ID, the tools select the resource from the library with higher + priority. The application itself has highest priority and its resources are always used in + preference to identical resource IDs defined in libraries.</p> + </li> + + <li>Use the <strong>Scope</strong> drop-down to select how the dependency will be applied.</li> + + <li>Click <strong>Apply</strong> to create the dependency and <strong>OK</strong> to close the + <strong>Project Structure</strong> window.</li> + </ol> + + <p>Android Studio rebuilds the module, including the contents of the library module the next time + the project or module is built.</p> + + + + <h3>Declaring library components in the manifest file</h3> + + <p>In the manifest file of the application module, you must add declarations of all components + that the application will use that are imported from a library module. For example, you must + declare any <code><activity></code>, <code><service></code>, + <code><receiver></code>, <code><provider></code>, and so on, as well as + <code><permission></code>, <code><uses-library></code>, and similar elements.</p> + + <p>Declarations should reference the library components by their fully-qualified package names, + where appropriate.</p> + + <p>For example, the <a href= + "{@docRoot}resources/samples/TicTacToeMain/AndroidManifest.html">TicTacToeMain</a> example + application declares the library activity <code>GameActivity</code> like this:</p> + <pre> +<manifest> + ... + <application> + ... + <activity android:name="com.example.android.tictactoe.library.GameActivity" /> + ... + </application> +</manifest> +</pre> + + <p>For more information about the manifest file, see the documentation for <a href= + "{@docRoot}guide/topics/manifest/manifest-intro.html">AndroidManifest.xml</a>.</p> + + + <h2 id="ProjectView">Using the Android Project View</h2> + + +<p>The Android project view in Android Studio shows a flattened version of your project's structure +that provides quick access to the key source files of Android projects and helps you work with +the new <a href="{@docRoot}sdk/installing/studio-build.html">Gradle-based build system</a>. The +Android project view:</p> + +<ul> +<li>Groups the build files for all modules at the top level of the project hierarchy.</li> +<li>Shows the most important source directories at the top level of the module hierarchy.</li> +<li>Groups all the manifest files for each module.</li> +<li>Shows resource files from all Gradle source sets.</li> +<li>Groups resource files for different locales, orientations, and screen types in a single group +per resource type.</li> +</ul> + +<div style="float:right;margin-left:30px;width:240px"> +<img src="{@docRoot}images/tools/projectview01.png" alt="" width="220" height="264"/> +<p class="img-caption"><strong>Figure 9:</strong> Show the Android project view.</p> +</div> + + +<h2 id="enable-view">Enable and use the Android Project View</h2> + +<p>The Android project view is not yet enabled by default. To show the Android project view, +click <strong>Project</strong> and select <strong>Android</strong>, as shown in figure 9.</p> + +<p>The Android project view shows all the build files at the top level of the project hierarchy +under <strong>Gradle Scripts</strong>. Each project module appears as a folder at the top +level of the project hierarchy and contains these three elements at the top level:</p> + +<ul> +<li><code>java/</code> - Source files for the module.</li> +<li><code>manifests/</code> - Manifest files for the module.</li> +<li><code>res/</code> - Resource files for the module.</li> +</ul> + +<p>Figure 10 shows how the Android project view groups all the instances of the +<code>ic_launcher.png</code> resource for different screen densities under the same element.</p> + +<p class="note"><strong>Note:</strong> The Android project view shows a hierarchy that helps you +work with Android projects by providing a flattened structure that highlights the most commonly +used files while developing Android applications. However, the project structure on disk differs +from this representation.</p> + +<img src="{@docRoot}images/tools/projectview03.png" alt="" + style="margin-top:10px" width="650" height="508"/> +<p class="img-caption"><strong>Figure 10:</strong> The traditional project view (left) and the +Android project view (right).</p> + + + + diff --git a/docs/html/tools/projects/templates.jd b/docs/html/tools/projects/templates.jd index fce24fd..966d25f 100644 --- a/docs/html/tools/projects/templates.jd +++ b/docs/html/tools/projects/templates.jd @@ -28,7 +28,7 @@ page.title=Using Code Templates <p>The SDK tools provide templates for quickly creating Android application projects with the basic - structure or for adding components to your existing projects. The code templates + structure or for adding components to your existing application modules. The code templates provided by the Android SDK follow the Android design and development guidelines to get you on the right track to creating a beautiful, functional application.</p> @@ -45,30 +45,29 @@ page.title=Using Code Templates <h2 id="app-templates">Application Templates</h2> -<p>Application templates create basic Android applications that you can immediately run and test - on your Android device. These templates are available when you create a new Android project, +<p>Application templates create basic Android application modules that you can immediately run and test + on your Android device. These templates are available when you create a new Android module, though you can also use these templates to <a href="#activity-templates">add new activities</a> - to an existing project.</p> + to an existing module.</p> <p>To use Android application templates:</p> <ol> - <li>In Eclipse, with the Android Development Tools (ADT) plugin installed, select <strong>File - > New > Android</strong>.</li> - <li>Select <strong>Android > Android Application Project</strong>, and click - <strong>Next</strong>.</li> + <li>In Android Studio, select <strong>File > New > Module</strong>.</li> <li>Enter the settings for your application, including <strong>Application Name</strong>, - <strong>Project Name</strong>, <strong>Package Name</strong>, API level settings and - presentation <strong>Theme</strong>, and click <strong>Next</strong>.</li> - <li>Enter the project configuration options, and click <strong>Next</strong>.</li> - <li>Optionally enter launcher icon settings, and click <strong>Next</strong>.</li> - <li>In the <strong>Create Activity</strong> page, select an application template to use. + <strong>Company Domain</strong>, <strong>Package name</strong>, and <strong>minimum SDK</strong>, + then click <strong>Next</strong>.</li> + <li>Select an application template to use, then click <strong>Next</strong>. For example, <ul> <li><a href="#blank-activity">BlankActivity</a></li> <li><a href="#full-screen-activity">FullScreenActivity</a></li> <li><a href="#master-detail-activity">MasterDetailFlow</a></li> + </ul> </li> + <li>Enter the settings for your activity, including <strong>Activity Name</strong>, + <strong>layout Name</strong>, <strong>Title</strong>, and <strong>Menu Resource Name</strong>, + then click <strong>Finish</strong>.</li> </ol> <p class="note"> @@ -247,7 +246,7 @@ page.title=Using Code Templates <li>Right click the project folder of the Android application where you want to add an activity.</li> <li>Select <strong>New > Other...</strong></li> - <li>Select <strong>Android > Android Activity</strong>, and click <strong>Next</strong>.</li> + <li>Select <strong>Android > Android Activity</strong>, then click <strong>Next</strong>.</li> <li>Select an activity template, then follow the instructions to add it to your existing application. <ul> @@ -331,17 +330,23 @@ including the previously mentioned activities as well as the following additiona <p>To use Android object templates:</p> <ol> - <li>Right click the project folder of the Android application where you want to add a code + <li>Right-click the module folder of the Android application where you want to add a code component.</li> - <li>Select <strong>New > Other...</strong></li> - <li>Select <strong>Android > Android Object</strong>, and click <strong>Next</strong>.</li> - <li>Select an object template, then follow the instructions to add it to your existing + <li>Select <strong>New</strong></li> + <li>Select the object type and template, then follow the instructions to add it to your existing application. <ul> - <li>{@link android.content.BroadcastReceiver}</li> - <li>{@link android.content.ContentProvider}</li> - <li><a href="{@docRoot}guide/topics/ui/custom-components.html">Custom View</a></li> - <li>{@link android.app.Service}</li> + <li>AIDL</li> + <li>Activity</li> + <li>Folder</li> + <li>Fragment</li> + <li>Google</li> + <li>Other</li> + <li>Service</li> + <li>UI Component</li> + <li>Wear</li> + <li>Widget</li> + <li>XML</li> </ul> </li> </ol> diff --git a/docs/html/tools/basics/index.jd b/docs/html/tools/studio/index.jd index 25d8f0a..25d8f0a 100644 --- a/docs/html/tools/basics/index.jd +++ b/docs/html/tools/studio/index.jd diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs index 81d7d5d..51f65f6 100644 --- a/docs/html/tools/tools_toc.cs +++ b/docs/html/tools/tools_toc.cs @@ -18,9 +18,9 @@ <!-- Android Studio menu--> <li class="nav-section"> - <div class="nav-section-header"><a href="<?cs var:toroot?>tools/basics/index.html"><span class="en">Android Studio</span></a></div> + <div class="nav-section-header"><a href="<?cs var:toroot?>tools/studio/index.html"><span class="en">Android Studio</span></a></div> <ul> - <li><a href="<?cs var:toroot ?>tools/basics/studio-tips.html">Tips and Tricks</a> </li> + <li><a href="<?cs var:toroot ?>sdk/installing/studio-tips.html">Tips and Tricks</a> </li> </ul> </li><!-- End of Android Studio Basics --> @@ -50,7 +50,7 @@ </ul> </li> <li class="nav-section"> - <div class="nav-section-header"><a href="<?cs var:toroot ?>tools/projects/index.html"><span class="en">Setting Up Projects</span></a></div> + <div class="nav-section-header"><a href="<?cs var:toroot ?>tools/projects/index.html"><span class="en">Managing Projects</span></a></div> <ul> <li><a href="<?cs var:toroot ?>tools/projects/projects-studio.html"><span class="en">From Android Studio</span></a></li> <li><a href="<?cs var:toroot ?>tools/projects/projects-cmdline.html"><span class="en">From the Command Line</span></a></li> @@ -292,7 +292,7 @@ class="en">Platforms</span></a></li> <span class="en">Eclipse with ADT</span></a> </div> <ul> - <li><a href="<?cs var:toroot ?>tools/eclipse/migrate-adt.html">Migrating to Android Studio</a></li> + <li><a href="<?cs var:toroot ?>tools/sdk/installing/migrate.html">Migrating to Android Studio</a></li> <li><a href="<?cs var:toroot ?>tools/projects/projects-eclipse.html">Managing Projects</a></li> <li><a href="<?cs var:toroot ?>tools/building/building-eclipse.html">Building and Running</a></li> <li><a href="<?cs var:toroot ?>tools/building/building-cmdline-ant.html">Building with Ant</a></li> diff --git a/docs/html/training/basics/firstapp/index.jd b/docs/html/training/basics/firstapp/index.jd index d5df0b7..4dca352 100644 --- a/docs/html/training/basics/firstapp/index.jd +++ b/docs/html/training/basics/firstapp/index.jd @@ -15,8 +15,7 @@ helpoutsWidget=true <h2>Dependencies and prerequisites</h2> <ul> - <li><a href="{@docRoot}sdk/index.html">Android SDK</a></li> - <li><a href="{@docRoot}sdk/installing/studio.html">Android Studio</a></li> + <li><a href="{@docRoot}sdk/index.html">Android Studio</a></li> </ul> </div> @@ -33,10 +32,9 @@ design, including how to build a simple user interface and handle user input.</p <p>Before you start this class, be sure you have your development environment set up. You need to:</p> <ol> - <li>Download the <a href="{@docRoot}sdk/index.html">Android SDK</a>.</li> - <li>Install <a href="{@docRoot}sdk/installing/studio.html">Android Studio</a>.</li> - <li>Download the latest SDK tools and platforms using the <a href="{@docRoot}tools/help/sdk-manager.html"> - SDK Manager</a>.</li> + <li>Download the <a href="{@docRoot}sdk/index.html">Android Studio</a>.</li> + <li>Download the latest SDK tools and platforms using the + <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>.</li> </ol> <p class="note"><strong>Note:</strong> Make sure you install the most recent versions of Android diff --git a/docs/html/training/basics/firstapp/running-app.jd b/docs/html/training/basics/firstapp/running-app.jd index 50b4fea..c09669f 100644 --- a/docs/html/training/basics/firstapp/running-app.jd +++ b/docs/html/training/basics/firstapp/running-app.jd @@ -70,7 +70,7 @@ line tools.</p> <h3>Run the app from Android Studio</h3> <ol> - <li>Open one of your project's files and click + <li>Select one of your project's files and click <strong>Run</strong> <img src="{@docRoot}images/tools/as-run.png" style="vertical-align:baseline;margin:0; max-height:1em" /> from the toolbar.</li> |
