blob: ceaa70aa274ec30226f9f8fc1e63661d23b1595a [file] [log] [blame]
Scott Main441e8b92013-04-19 17:42:08 -07001page.title=Getting Started with Android Studio
Scott Main527b76232013-05-15 02:33:57 -07002page.tags="studio"
Scott Main441e8b92013-04-19 17:42:08 -07003@jd:body
4
5
6
7
8<div style="position:relative;min-height:660px;">
9
10<h3 style="color:#f80">EARLY ACCESS PREVIEW</h3>
11
12<div id="tos" style="position:absolute;display:none;width:inherit;">
13<div class="col-13" style="margin:0;">&nbsp;</div><!-- provides top margin for content -->
14
15
16<p class="sdk-terms-intro">Before installing the Android SDK, you must agree to the following terms and conditions.</p>
17
18<div class="sdk-terms" onfocus="this.blur()">
19<h2 class="norule">Terms and Conditions</h2>
20This is the Android Software Development Kit License Agreement
21
22<h3>1. Introduction</h3>
231.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.
24
Scott Maind4b710c2013-05-23 15:33:05 -0700251.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.
Scott Main441e8b92013-04-19 17:42:08 -070026
271.3 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
28
29
30<h3>2. Accepting this License Agreement</h3>
312.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.
32
332.2 By clicking to accept, you hereby agree to the terms of this License Agreement.
34
352.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.
36
372.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.
38
39
40<h3>3. SDK License from Google</h3>
413.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.
42
433.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.
44
453.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.
46
473.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.
48
493.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.
50
513.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.
52
533.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.
54
553.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.
56
57
58<h3>4. Use of the SDK by You</h3>
594.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.
60
614.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).
62
634.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.
64
654.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.
66
674.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.
68
694.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.
70
71
72<h3>5. Your Developer Credentials</h3>
735.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.
74
75
76<h3>6. Privacy and Information</h3>
776.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.
78
796.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy.
80
81
82<h3>7. Third Party Applications</h3>
837.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.
84
857.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.
86
877.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.
88
89
90<h3>8. Using Android APIs</h3>
918.1 Google Data APIs
92
938.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.
94
958.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.
96
97
98<h3>9. Terminating this License Agreement</h3>
999.1 This License Agreement will continue to apply until terminated by either you or Google as set out below.
100
1019.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.
102
1039.3 Google may at any time, terminate this License Agreement with you if:
104(A) you have breached any provision of this License Agreement; or
105(B) Google is required to do so by law; or
106(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
107(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.
108
1099.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.
110
111
112<h3>10. DISCLAIMER OF WARRANTIES</h3>
11310.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.
114
11510.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.
116
11710.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.
118
119
120<h3>11. LIMITATION OF LIABILITY</h3>
12111.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.
122
123
124<h3>12. Indemnification</h3>
12512.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.
126
127
128<h3>13. Changes to the License Agreement</h3>
12913.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.
130
131
132<h3>14. General Legal Terms</h3>
13314.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.
134
13514.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.
136
13714.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.
138
13914.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.
140
14114.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.
142
14314.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.
144
14514.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.
146
147
148<em>November 13, 2012</em>
149</div>
150
151
152
153<div id="sdk-terms-form">
154<p>
155<input id="agree" type="checkbox" name="agree" value="1" onclick="onAgreeChecked()" />
156<label id="agreeLabel" for="agree">I have read and agree with the above terms and conditions</label>
157</p>
158<p id="bitpicker" style="display:none">
159 <input id="32" onclick="onAgreeChecked()" type="radio" name="bit" value="32">
160 <label for="32">32-bit</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
161 <input id="64" onclick="onAgreeChecked()" type="radio" name="bit" value="64">
162 <label for="64">64-bit</label>
163</p>
164<p><a href="" class="button disabled" id="downloadForRealz" onclick="return onDownloadForRealz(this);"></a></p>
165</div>
166
167
168
169</div><!-- end TOS -->
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188<div id="main">
189
Scott Main857814c2013-09-24 08:54:35 -0700190<div class="figure" style="width:400px;margin-top:-20px">
Scott Main441e8b92013-04-19 17:42:08 -0700191<img src="{@docRoot}images/tools/android-studio.png" height="330" width="400" style="margin-bottom:20px" />
192
193<a class="big button subtitle" id="download-ide-button"
194href="" style="display:none;width:265px;margin:0 auto;display:block;font-size:18px" ></a>
195<div style="width:290px;padding:10px 40px 0 60px;font-size:12px;line-height:16px">
196
197<p style="margin-bottom:8px">This download includes:</p>
198<ul>
199<li>Android Studio <b>early access preview</b></li>
200<li>All the Android SDK Tools to design, test, debug, and profile your app</li>
201<li>The latest Android platform to compile your app</li>
202<li>The latest Android system image to run your app in the emulator</li>
203</ul>
204
205</div>
206</div>
207
208
209
210<p>Android Studio is a new Android development environment based on IntelliJ
211IDEA. Similar to Eclipse with the
212ADT Plugin, Android Studio provides integrated Android developer tools
213for development and debugging. On top of the
214capabilities you expect from IntelliJ, Android Studio offers:</p>
215
216<ul>
217 <li>Gradle-based build support.</li>
218 <li>Android-specific refactoring and quick fixes.</li>
219 <li>Lint tools to catch performance, usability, version compatibility and other problems.</li>
220 <li>ProGuard and app-signing capabilities. </li>
221 <li>Template-based wizards to create common Android designs and components.</li>
222 <li>A rich layout editor that allows you to drag-and-drop UI components, preview layouts on
223 multiple screen configurations, and much more.</li>
Scott Main857814c2013-09-24 08:54:35 -0700224 <li>Built-in support for <a
225 href="http://android-developers.blogspot.com/2013/06/adding-backend-to-your-app-in-android.html"
226 class="external-link">Google Cloud Platform</a>, making it easy to integrate Google Cloud
227 Messaging and App Engine as server-side components.
Scott Main441e8b92013-04-19 17:42:08 -0700228</ul>
229
230<p class="caution"><strong>Caution:</strong> Android Studio is currently available as
231an <strong>early access preview</strong>. Several features
232are either incomplete or not yet implemented and you may encounter bugs. If you are not
233comfortable using an unfinished product, you may want to instead
234download (or continue to use) the
235<a href="{@docRoot}sdk/index.html">ADT Bundle</a> (Eclipse with the ADT Plugin).</p>
236
237
Scott Main441e8b92013-04-19 17:42:08 -0700238<h4 style="clear:right;text-align:right;margin-right:50px"><a href='' class="expandable"
239 onclick="toggleExpandable(this,'.pax');return false;"
240 >DOWNLOAD FOR OTHER PLATFORMS</a></h4>
241
Scott Main441e8b92013-04-19 17:42:08 -0700242<div class="pax col-13 online" style="display:none;margin:0;">
243
Scott Main441e8b92013-04-19 17:42:08 -0700244 <table class="download">
245 <tr>
246 <th>Platform</th>
247 <th>Package</th>
248 <th>Size</th>
249 <th>MD5 Checksum</th>
250 </tr>
251
252 <tr>
253 <td>Windows</td>
254 <td>
255 <a onclick="return onDownload(this)" id="win-studio"
Scott Mainc1ae12b2014-01-30 08:55:01 -0800256 href="http://dl.google.com/android/studio/install/0.4.2/android-studio-bundle-133.970939-windows.exe">
257 android-studio-bundle-133.970939-windows.exe
Scott Main441e8b92013-04-19 17:42:08 -0700258 </a>
259 </td>
Scott Mainc1ae12b2014-01-30 08:55:01 -0800260 <td>515261701 bytes</td>
261 <td>1e1ae28b1c00f43d55f17ee35bd4f5d2</td>
Scott Main441e8b92013-04-19 17:42:08 -0700262 </tr>
263
264 <tr>
265 <td><nobr>Mac OS X</nobr></td>
266 <td>
267 <a onclick="return onDownload(this)" id="mac-studio"
Scott Mainc1ae12b2014-01-30 08:55:01 -0800268 href="http://dl.google.com/android/studio/install/0.4.2/android-studio-bundle-133.970939-mac.dmg">
269 android-studio-bundle-133.970939-mac.dmg
Scott Main441e8b92013-04-19 17:42:08 -0700270 </a>
271 </td>
Scott Mainc1ae12b2014-01-30 08:55:01 -0800272 <td>491773471 bytes</td>
273 <td>6753f67c56acb17617bfbc5bc56384e7</td>
Scott Main441e8b92013-04-19 17:42:08 -0700274 </tr>
275
276 <tr>
277 <td>Linux</td>
278 <td>
279 <a onclick="return onDownload(this)" id="linux-studio"
Scott Mainc1ae12b2014-01-30 08:55:01 -0800280 href="http://dl.google.com/android/studio/install/0.4.2/android-studio-bundle-133.970939-linux.tgz">
281 android-studio-bundle-133.970939-linux.tgz
Scott Main441e8b92013-04-19 17:42:08 -0700282 </a>
283 </td>
Scott Mainc1ae12b2014-01-30 08:55:01 -0800284 <td>516080363 bytes</td>
285 <td>25455787d76e61baf34bf93eaa00ded6</td>
Scott Main441e8b92013-04-19 17:42:08 -0700286 </tr>
287 </table>
288
289</div><!-- end pax -->
290
291
292
Siva Velusamy3ebe71c2013-10-25 17:14:55 -0700293<h2 id="Updating">Updating from older versions</h2>
Scott Main276f0ce2013-07-11 15:31:10 -0700294
Siva Velusamy3ebe71c2013-10-25 17:14:55 -0700295<p>If you already have Android Studio installed, in most cases, you can upgrade to the latest
296version by installing a patch. From within Android Studio, select
Scott Main2aa2b1c2013-11-01 14:47:35 -0700297<strong>Help &gt; Check for updates</strong> (on Mac, <strong>Android Studio &gt;
298Check for updates</strong>) to see whether an update is available.</p>
Siva Velusamy3ebe71c2013-10-25 17:14:55 -0700299
300<p>If an update is not available,
Scott Main276f0ce2013-07-11 15:31:10 -0700301follow the <a href="#Installing">installation instructions</a> below and replace your existing
302installation.</p>
303
Scott Mainad175232013-07-12 11:28:01 -0700304<div class="caution">
305<p><strong>Caution:</strong> Replacing your existing installation of
Scott Main276f0ce2013-07-11 15:31:10 -0700306Android Studio will remove any additional SDK packages you've installed, such as target
307platforms, system images, and sample apps. To preserve these, copy them from your current
308SDK directory under Android Studio to a temporary location
309before installing the update. Then move them back once the update is complete.
310If you fail to copy these packages, then you can instead download them again through
311the Android SDK Manager.</p>
Scott Mainad175232013-07-12 11:28:01 -0700312</div>
313
Scott Main276f0ce2013-07-11 15:31:10 -0700314
Siva Velusamy3ebe71c2013-10-25 17:14:55 -0700315<p>Also note that due to the update to Android Gradle Plugin 0.6, you will encounter errors when opening
Scott Main276f0ce2013-07-11 15:31:10 -0700316existing projects. See the <a href="#Troubleshooting">Troubleshooting</a> notes below for
317information about how to resolve them.</p>
318
319
Scott Main441e8b92013-04-19 17:42:08 -0700320<h2 id="Installing">Installing Android Studio</h2>
321<ol>
322<li>Download the <strong>Android Studio</strong> package from above.</li>
323<li>Install Android Studio and the SDK tools:
324 <p><b>Windows:</b></p>
325 <ol>
Scott Main3ff66532013-05-20 14:35:30 -0700326 <li>Launch the downloaded EXE file, {@code android-studio-bundle-&lt;version&gt;.exe}.</li>
Scott Main441e8b92013-04-19 17:42:08 -0700327 <li>Follow the setup wizard to install Android Studio.
Scott Maindf82d252013-05-16 17:58:11 -0700328
Scott Maindf82d252013-05-16 17:58:11 -0700329 <div class="caution"><p><strong>Known issue:</strong>
330 On some Windows systems, the launcher script does not find where Java is installed.
331 If you encounter this problem,
332 you need to set an environment variable indicating the correct location.</p>
333 <p>Select <strong>Start menu > Computer > System Properties >
334 Advanced System Properties</strong>. Then open <strong>Advanced tab > Environment
335 Variables</strong> and add a new system variable <code>JAVA_HOME</code> that points to
336 your JDK folder, for example <code>C:\Program Files\Java\jdk1.7.0_21</code>.</p>
337 </div>
Scott Main3ff66532013-05-20 14:35:30 -0700338 </li>
Scott Maindf82d252013-05-16 17:58:11 -0700339
Scott Main441e8b92013-04-19 17:42:08 -0700340 </ol>
341 <p><b>Mac OS X:</b></p>
342 <ol>
Scott Main3ff66532013-05-20 14:35:30 -0700343 <li>Open the downloaded DMG file, {@code android-studio-bundle-&lt;version&gt;.dmg}.</li>
Scott Main441e8b92013-04-19 17:42:08 -0700344 <li>Drag and drop Android Studio into the Applications folder.
Scott Main3ff66532013-05-20 14:35:30 -0700345
346 <div class="caution"><p><strong>Known issue:</strong>
347 Depending on your security settings, when you attempt to open Android Studio, you might
348 see a warning that says the package is damaged and should be moved to the trash. If this
349 happens, go to <strong>System Preferences > Security &amp; Privacy</strong> and under
350 <strong>Allow applications downloaded from</strong>, select <strong>Anywhere</strong>.
351 Then open Android Studio again.</p>
352 </div>
353 </li>
354
Scott Main441e8b92013-04-19 17:42:08 -0700355 </ol>
356 <p><b>Linux:</b></p>
357 <ol>
358 <li>Unpack the downloaded Tar file, {@code android-studio-bundle-&lt;version&gt;.tgz}, into an appropriate
359 location for your applications.
360 <li>To launch Android Studio, navigate to the {@code android-studio/bin/} directory
361 in a terminal and execute {@code studio.sh}.
362 <p>You may want to add {@code android-studio/bin/} to your PATH environmental
363 variable so that you can start Android Studio from any directory.</p>
364 </li>
365 </ol>
366</li>
367</ol>
368
369<p>That's it! You're ready to start developing apps with Android Studio.</p>
370
371<div class="note">
372<p><strong>Note:</strong> On Windows and Mac, the individual tools and
373other SDK packages are saved within the Android Studio application directory.
374To access the tools directly, use a terminal to navigate into the application and locate
375the {@code sdk/} directory. For example:</p>
376<p>Windows: <code>\Users\&lt;user&gt;\AppData\Local\Android\android-studio\sdk\</code></p>
377<p>Mac: <code>/Applications/Android\ Studio.app/sdk/</code></p>
378</div>
379
Scott Maindf82d252013-05-16 17:58:11 -0700380<p>For a list of some known issues, see <a
381href="http://tools.android.com/knownissues">tools.android.com/knownissues</a>.</p>
382
Scott Main441e8b92013-04-19 17:42:08 -0700383
384<h2 id="Start">Starting a Project</h2>
385
386<p>When you launch Android Studio for the first time, you'll see a Welcome
387screen that offers several ways to get started:</p>
388
389<ul>
390 <li>To start building a new app, click <strong>New Project</strong>.
391 <p>This starts the New Project wizard, which helps you set up a project using an app template.
392 </li>
393 <li>To import an existing Android app project, click <strong>Import Project</strong>.
394 <p class="note"><strong>Note:</strong> If you previously developed your Android project
395 with Eclipse, you should first use the new export feature in the ADT plugin to prepare
396 your project with the new Gradle build system. For more information, read
397 <a href="{@docRoot}sdk/installing/migrate.html">Migrating from Eclipse</a>.</p>
398 </li>
399</ul>
400
401<p>For additional help using Android Studio, read <a
402href="{@docRoot}sdk/installing/studio-tips.html">Tips and Tricks</a>.</p>
403
404
405<p>As you continue developing apps, you may need to install additional versions
406of Android for the emulator and other packages such as the <a
Scott Main4e2c9dc2013-07-23 19:35:17 -0700407href="{@docRoot}tools/support-library/index.html">Android Support Library</a>.
Scott Main441e8b92013-04-19 17:42:08 -0700408To install more packages, use
409the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>, which you can
410open from Android Studio by clicking <strong>SDK Manager</strong>
411<img src="{@docRoot}images/tools/sdk-manager-studio.png"
412style="vertical-align:bottom;margin:0;height:19px" /> in the toolbar.</p>
413
414
415
416
417
418
419
420
421
Scott Maind4b710c2013-05-23 15:33:05 -0700422<h2 id="Revisions">Revisions</h2>
423
424<div class="toggle-content opened">
425 <p><a href="#" onclick="return toggleContent(this)">
426 <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
Scott Mainc1ae12b2014-01-30 08:55:01 -0800427 alt=""/>Android Studio v0.4.2</a> <em>(Jan 2014)</em>
428 </p>
429
430 <div class="toggle-content-toggleme">
431 <ul>
432 <li>See <a href="http://tools.android.com/recent">tools.android.com</a> for a full list of changes.</li>
433 </ul>
434 </div>
435</div>
436
437<div class="toggle-content closed">
438 <p><a href="#" onclick="return toggleContent(this)">
439 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
Raphael Mollfec78b72013-11-08 14:39:26 -0800440 alt=""/>Android Studio v0.3.2</a> <em>(Oct 2013)</em>
Siva Velusamy3ebe71c2013-10-25 17:14:55 -0700441 </p>
442
443 <div class="toggle-content-toggleme">
444 <ul>
445 <li>See <a href="http://tools.android.com/recent">tools.android.com</a> for a full list of changes.</li>
446 </ul>
447 </div>
448</div>
449
450<div class="toggle-content closed">
451 <p><a href="#" onclick="return toggleContent(this)">
452 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
Scott Main276f0ce2013-07-11 15:31:10 -0700453 alt=""/>Android Studio v0.2.x</a> <em>(July 2013)</em>
454 </p>
455
456 <div class="toggle-content-toggleme">
457 <ul>
458 <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>
459 <li>Android Gradle plug-in updated to 0.5.0.
460 <p class="caution"><strong>Caution:</strong> This new version is not backwards compatible.
461 When opening a project that uses an older version of the plug-in, Studio will show an error
462 stating <strong>Gradle &lt;project_name&gt; project refresh failed.</strong> See <a
463 href="#Troubleshooting">Troubleshooting</a> below for details.</p>
464 <p>The updated Gradle plug-in includes the following changes:</p>
465 <ul>
466 <li>Fixed IDE model to contain the output file even if it's customized through the DSL. Also
467 fixed the DSL to get/set the output file on the variant object so that it's not necessary to
468 use <code>variant.packageApplication or variant.zipAlign</code></li>
469 <li>Fixed dependency resolution so that we resolved the combination of (default config,
470 build types, flavor(s)) together instead of separately.</li>
471 <li>Fixed dependency for tests of library project to properly include all the dependencies
472 of the library itself.</li>
473 <li>Fixed case where two dependencies have the same leaf name.</li>
474 <li>Fixed issue where Proguard rules file cannot be applied on flavors.</li>
475 </ul>
476 <p>All Gradle plugin release notes are available are here: <a href=
477 "http://tools.android.com/tech-docs/new-build-system"
478 >http://tools.android.com/tech-docs/new-build-system</a>.</p>
479 </li>
480 <li>Gradle errors from aapt no longer point to merged output files in the build/ folder, they
481 point back to the real source locations.</li>
482 <li>Parallel Builds. It's now possible to use Gradle's parallel builds. Please be aware that
483 parallel builds are in "incubation" (see <a
484 href="http://www.gradle.org/docs/current/userguide/gradle_command_line.html">Gradle's
485 documentation</a>.) This feature is off by default. To enable it, go to
486 <strong>Preferences</strong> &gt; <strong>Compiler</strong> and check the box <em>Compile
487 independent modules in parallel</em>.</li>
488 <li>Further work on the new resource repository used for layout rendering, resource
489 folding in the editor, and more:
490 <ul>
491 <li>Basic support for .aar library dependencies (e.g. using a library without a local copy of
492 the sources). Still not working for resource XML validation and navigation in source editors.
493 </li>
494 <li>Cycle detection in resource references.</li>
495 <li>Quick Documentation (F1), which can show all translations of the string under the caret,
496 will now also show all resource overlays from the various Gradle flavors and build types, as
497 well as libraries. They are listed in reverse resource overlay order, with strikethrough on
498 the versions of the string that are masked.</li>
499 <li>Fixes to handle updating the merged resources when the set of module dependencies
500 change.</li>
501 <li>XML rendering fixes to properly handle character entity declarations and XML and unicode
502 escapes.</li>
503 </ul>
504 <li>Save screenshot support for the layout preview and layout editor windows.</li>
505 <li>Template bug fixes.</li>
506 <li>Lint bug fixes.</li>
507 <li>Various fixes for crash reports. Thank you, and keep filing crash reports!</li>
508 </ul>
509 </div>
510</div>
511
512<div class="toggle-content closed">
513 <p><a href="#" onclick="return toggleContent(this)">
514 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
Scott Mainec025db2013-06-13 15:00:43 -0700515 alt=""/>Android Studio v0.1.x</a> <em>(May 2013)</em>
Scott Maind4b710c2013-05-23 15:33:05 -0700516 </p>
517
518 <div class="toggle-content-toggleme">
519 <ul>
520 <li>Various bug fixes, including a fix for a common Windows installation issue.
521 </ul>
522 </div>
523</div>
524
Scott Main276f0ce2013-07-11 15:31:10 -0700525<p>&nbsp;</p>
526
527<p class="note"><strong>Note:</strong> Periodic updates are pushed to Android Studio
528without requiring you to update from here. To manually check for updates, select
529<strong>Help > Check for updates</strong> (on Mac, select <strong>Android Studio >
530Check for updates</strong>).</p>
Scott Maind4b710c2013-05-23 15:33:05 -0700531
532
533
Scott Main441e8b92013-04-19 17:42:08 -0700534
Scott Main276f0ce2013-07-11 15:31:10 -0700535<h2 id="Troubleshooting">Troubleshooting</h2>
Scott Main441e8b92013-04-19 17:42:08 -0700536
537
Scott Main276f0ce2013-07-11 15:31:10 -0700538<div class="figure" style="width:330px">
539<img src="{@docRoot}images/tools/studio_error_gradle5.png" width="330"/>
540<p class="img-caption"><strong>Figure 1.</strong> Error dialog when opening an existing project.</p>
541</div>
542
543<h3>Error: Gradle project refresh failed</h3>
544
545<p>Android Studio 0.2.0 has updated the Gradle plug-in to 0.5.0, which is not backwards compatible.
546When opening a project that uses an older version of the plug-in, Studio will display the error
547shown in figure 1 in the upper right corner of the IDE.
548To resolve the error, you must change the version of the Android Gradle plug-in to 0.5.0.</p>
549
550<ol>
551 <li>Click the link in the error dialog <strong>Search in build.gradle files</strong>. If the dialog
552is no longer visible, click <strong>Event Log</strong>
553<img src="{@docRoot}images/tools/studio_error_eventlog.png"
554style="vertical-align:bottom;margin:0;height:19px"/> in the bottom-right corner of the IDE,
555then click <strong>Search in build.gradle files</strong>.</li>
556 <li>Double-click the line under the <em>build.gradle</em> usage. For example:
557 <strong>classpath 'com.android.tools.build:gradle:0.4</strong>. This opens the project
558 <code>build.gradle</code> file.</li>
559 <li>Edit the <code>classpath</code> to change the gradle version to <code>0.5.+</code>.
560 For example:
561 <pre class="no-pretty-print">
562dependencies {
563 classpath 'com.android.tools.build:gradle:<strong>0.5.+</strong>'
564}
565</pre>
566 </li>
567 <li>Save the file and rebuild your project.</li>
568</ol>
569
570
571
572<div class="figure" style="width:330px">
573<img src="{@docRoot}images/tools/studio_error_supportlib.png" width="330"/>
574<p class="img-caption"><strong>Figure 2.</strong> Error dialog when creating a new project
575or opening a project using the support library.</p>
576</div>
577
578<h3>Error: Failed to import Gradle project</h3>
579
580<p>If, after updating to Android Studio 0.2.x and creating or opening a project, you receive an
581error stating <em>"Could not find any version that matches
Scott Mainad175232013-07-12 11:28:01 -0700582com.android.support:support-v4:13.0.+"</em>, then you must install the <strong>Android Support
Scott Main276f0ce2013-07-11 15:31:10 -0700583Repository</strong>. This was likely caused because you're pointing Android Studio to an external
584Android SDK location that does not have the new Maven repository included with Android Studio
5850.2.x. This new Maven repository is used by the new build system for the Support Library, instead
586of using the Support Library JAR files, so must be present in the SDK.</p>
587
588
589<ol>
590 <li>Open the <strong>Android SDK Manager</strong>.</li>
591 <li>Expand the <strong>Extras</strong> directory
Scott Mainad175232013-07-12 11:28:01 -0700592and install <strong>Android Support Repository</strong>.</li>
Scott Main276f0ce2013-07-11 15:31:10 -0700593</ol>
Scott Main441e8b92013-04-19 17:42:08 -0700594
Scott Mainad175232013-07-12 11:28:01 -0700595<p>If you've encountered other problems in Android Studio, look at the following page
596for possible resolutions to known issues: <a href="http://tools.android.com/knownissues"
597>http://tools.android.com/knownissues</a>.</p>
598
Scott Main441e8b92013-04-19 17:42:08 -0700599
600
601</div><!-- end main content -->
602
603
604
605
606</div><!-- end relative position wrapper -->
607
608
609
610
611
612
613
Scott Main276f0ce2013-07-11 15:31:10 -0700614
Scott Main441e8b92013-04-19 17:42:08 -0700615<script>
616 var os;
617 var bundlename;
618 var $toolslink;
619
620 if (navigator.appVersion.indexOf("Win")!=-1) {
621 os = "Windows";
622 bundlename = 'win-studio';
623 } else if (navigator.appVersion.indexOf("Mac")!=-1) {
624 os = "Mac";
625 bundlename = 'mac-studio';
626 } else if (navigator.appVersion.indexOf("Linux")!=-1) {
627 os = "Linux";
628 bundlename = 'linux-studio';
629 }
630
631 if (os) {
632 /* set up primary ACE download button */
633 $('#download-ide-button').show();
Scott Mainc1ae12b2014-01-30 08:55:01 -0800634 $('#download-ide-button').append("Download Android Studio <span class='small'>v0.4.2</span>"
Scott Main84ad0892013-07-11 17:26:13 -0700635 + "<br/> <span class='small'>for " + os + "</span>");
Scott Main441e8b92013-04-19 17:42:08 -0700636 $('#download-ide-button').click(function() {return onDownload(this,true);}).attr('href', bundlename);
637
638 } else {
639 $('.pax').show();
640 }
Scott Main276f0ce2013-07-11 15:31:10 -0700641
642
Scott Main441e8b92013-04-19 17:42:08 -0700643 function onDownload(link, button) {
Scott Mainc92ce292013-05-15 09:09:11 -0700644 var $studioLink;
Scott Main98599ee2013-05-15 08:45:39 -0700645
Scott Main441e8b92013-04-19 17:42:08 -0700646 /* set text for download button */
647 if (button) {
Scott Main98599ee2013-05-15 08:45:39 -0700648 $studioLink = $("a#"+$(link).attr('href'));
Scott Main441e8b92013-04-19 17:42:08 -0700649 $("#downloadForRealz").html($(link).text());
650 } else {
Scott Main98599ee2013-05-15 08:45:39 -0700651 $studioLink = $(link);
Scott Main441e8b92013-04-19 17:42:08 -0700652 $("#downloadForRealz").html("Download " + $(link).text());
653 }
Scott Main276f0ce2013-07-11 15:31:10 -0700654
Scott Main98599ee2013-05-15 08:45:39 -0700655 $("#downloadForRealz").attr('href', $studioLink.attr('href'));
Scott Main441e8b92013-04-19 17:42:08 -0700656
657 $("#tos").fadeIn('fast');
658 $("#main").fadeOut('fast');
659
660 location.hash = "download";
661 return false;
662 }
663
664
665 function onAgreeChecked() {
666 /* verify that the TOS is agreed */
667 if ($("input#agree").is(":checked")) {
668 /* reveal the download button */
669 $("a#downloadForRealz").removeClass('disabled');
670 } else {
671 $("a#downloadForRealz").addClass('disabled');
672 }
673 }
674
675 function onDownloadForRealz(link) {
676 if ($("input#agree").is(':checked')) {
Scott Main84ad0892013-07-11 17:26:13 -0700677 $("#tos").hide();
678 $("#main").show();
679 location.hash = "Updating";
Scott Main3aec4322013-11-20 12:51:28 -0800680 _gaq.push(['_trackEvent', 'SDK', 'Android Studio', $("#downloadForRealz").html()]);
Scott Main441e8b92013-04-19 17:42:08 -0700681 return true;
682 } else {
683 $("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#258AAF"}, 200,
684 function() {$("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#222"}, 200)}
685 );
686 return false;
687 }
688 }
689
690 $(window).hashchange( function(){
691 if (location.hash == "") {
692 location.reload();
693 }
694 });
695
696</script>