From bf36507aec1ed348a36b43467947c2dcbd0488e0 Mon Sep 17 00:00:00 2001 From: "smain@google.com" Date: Mon, 2 May 2016 12:35:56 -0700 Subject: [PATCH] Delete everything from /sdk directory that is now in /studio. Redirects are in https://critique.corp.google.com/#review/121297240 Change-Id: If746be8a3dc7208f59cb2a3b971316517e889fe6 --- docs/html/sdk/index.jd | 536 ------------------ docs/html/sdk/installing/bundle.jd | 3 - docs/html/sdk/installing/create-project.jd | 377 ------------ docs/html/sdk/installing/index.jd | 218 ------- docs/html/sdk/installing/migrate.jd | 267 --------- .../html/sdk/installing/studio-androidview.jd | 55 -- docs/html/sdk/installing/studio-build.jd | 104 ---- docs/html/sdk/installing/studio-layout.jd | 157 ----- docs/html/sdk/installing/studio-tips.jd | 342 ----------- docs/html/sdk/sdk_vars.cs | 64 --- docs/html/sdk/terms.jd | 144 ----- docs/html/sdk/win-usb.jd | 308 ---------- 12 files changed, 2575 deletions(-) delete mode 100644 docs/html/sdk/index.jd delete mode 100644 docs/html/sdk/installing/bundle.jd delete mode 100644 docs/html/sdk/installing/create-project.jd delete mode 100644 docs/html/sdk/installing/index.jd delete mode 100644 docs/html/sdk/installing/migrate.jd delete mode 100644 docs/html/sdk/installing/studio-androidview.jd delete mode 100755 docs/html/sdk/installing/studio-build.jd delete mode 100644 docs/html/sdk/installing/studio-layout.jd delete mode 100644 docs/html/sdk/installing/studio-tips.jd delete mode 100644 docs/html/sdk/sdk_vars.cs delete mode 100644 docs/html/sdk/terms.jd delete mode 100644 docs/html/sdk/win-usb.jd diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd deleted file mode 100644 index 1e7761b6d7794..0000000000000 --- a/docs/html/sdk/index.jd +++ /dev/null @@ -1,536 +0,0 @@ -page.title=Download Android Studio and SDK Tools -page.tags=sdk, android studio -page.template=sdk -section.landing=true -header.hide=1 -nonavpage=true -fullpage=true -page.image=images/cards/android-studio_2x.png -page.metaDescription=Download the official Android IDE and developer tools to build apps for Android phones, tablets, wearables, TVs, and more. - -@jd:body - - - -
-
-
-
- -
-
-

Android Studio
-The Official IDE for Android

- -

Android Studio provides the fastest tools for -building apps on every type of Android device.

- -

World-class code editing, debugging, -performance tooling, a flexible build system, and an instant build/deploy -system all allow you to focus on building unique and high quality apps.

- -

- Download Android Studio 2.1
-
-

- -

- - - Read the docs - - - See the release notes -

-
-
-
-
- - - - - -
-
-
-
-
- -
-
-

Download Android Studio

-
-
-
-
-
-
-
-

Before downloading, - you must agree to the following terms - and conditions.

-
- -
-

Terms and Conditions

-This is the Android Software Development Kit License Agreement - -

1. Introduction

-1.1 The Android Software Development Kit (referred to in the 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 the License Agreement. The 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 A "compatible implementation" means any Android device that (i) complies with the Android Compatibility Definition document, which can be found at the Android compatibility website (http://source.android.com/compatibility) and which may be updated from time to time; and (ii) successfully passes the Android Compatibility Test Suite (CTS). - -1.4 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States. - - -

2. Accepting this License Agreement

-2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK if you do not accept the License Agreement. - -2.2 By clicking to accept, you hereby agree to the terms of the 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 the 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 the 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. - - -

3. SDK License from Google

-3.1 Subject to the terms of the License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the SDK solely to develop applications for compatible implementations of Android. - -3.2 You may not use this SDK to develop applications for other platforms (including non-compatible implementations of Android) or to develop another SDK. You are of course free to develop applications for other platforms, including non-compatible implementations of Android, provided that this SDK is not used for that purpose. - -3.3 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.4 You may not use the SDK for any purpose not expressly permitted by the 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.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 the 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 the 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. - - -

4. Use of the SDK by You

-4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under the 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) the 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 the 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. - - -

5. Your Developer Credentials

-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. - - -

6. Privacy and Information

-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. - - -

7. Third Party Applications

-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, the License Agreement does not affect your legal relationship with these third parties. - - -

8. Using Android APIs

-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. - - -

9. Terminating this License Agreement

-9.1 The License Agreement will continue to apply until terminated by either you or Google as set out below. - -9.2 If you want to terminate the 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 the License Agreement with you if: -(A) you have breached any provision of the 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 the 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 the 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. - - -

10. DISCLAIMER OF WARRANTIES

-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. - - -

11. LIMITATION OF LIABILITY

-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. - - -

12. Indemnification

-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 the License Agreement. - - -

13. Changes to the License Agreement

-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. - - -

14. General Legal Terms

-14.1 The 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 the 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 the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the 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 the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the 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 the 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 the 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 the License Agreement without the prior written approval of the other party. - -14.7 The License Agreement, and your relationship with Google under the 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 the 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. - -November 20, 2015 -
- - - - - -
-

- - -

-

-
- - -
- -
-
-
-
-
-
- - -
- -
- - - - - - -
-
- -
-
-
- -
-
-
-

Instant Run

-

Push code and resource -changes to your app running on a device or emulator and see the -changes instantly come to life.

-

Instant Run dramatically speeds up your edit, -build, and run cycles, keeping you "in the flow."

- - - Learn more -
-
-
- -
-
-
- -
-
-
-

Intelligent code editor

-

Write better code, work faster, and be more productive with an intelligent code editor that helps you each step of the way.

-

Android Studio is built on IntelliJ and is capable of advanced code completion, refactoring, and code analysis.

-
-
-
- -
-
-
- -
-
-
-

Fast and feature-rich emulator

-

Install and run your apps faster than with a physical device and test your app on virtually any Android device configuration: Android phones, Android tablets, Android Wear, and Android TV devices.

-

The new Android Emulator 2.0 is faster than ever and allows you to dynamically resize the emulator and access a suite of sensor controls.

- - - Learn more -
-
-
- -
-
-
- -
-
-
-

Robust and flexible build system

-

Easily configure your project to include code libraries and generate multiple build variants from a single project.

-

With Gradle, Android Studio offers high-performance build automation, robust dependency management, and customizable build configurations.

- - - Learn more -
-
-
- -
- -
-
-
- -
-
-
-

Develop for all Android devices

-

Target multiple form factors with a single -project to easily share code among your different versions of your app.

-

Android Studio provides a unified environment -to develop apps for Android phones, tablets, Android Wear, Android TV, and -Android Auto.

- - - - Learn more -
-
-
- -
-
-
- -
-
-
-

Code templates and GitHub integration

-

Start projects with code templates for patterns such as navigation drawer and view pagers, or import Google code samples from GitHub.

-

Android Studio's project wizards make it easier than ever to add code in a new project.

-
-
-
- -
- - - -
-
- - - -
-

Latest News

-
-
-
- -
-

Resources

-
-
-
- -
-

Videos

-
-
-
- - - -
-
- -

System Requirements

- -
- -
-

Windows

-
    -
  • Microsoft® Windows® 7/8/10 (32- or 64-bit)
  • -
  • 2 GB RAM minimum, 8 GB RAM recommended
  • -
  • 2 GB of available disk space minimum,
    4 GB Recommended -(500 MB for IDE + 1.5 GB for -Android SDK and emulator system image)
  • -
  • 1280 x 800 minimum screen resolution
  • -
  • Java Development Kit (JDK) 8
  • -
  • For accelerated emulator: 64-bit operating system and -Intel® processor with support for Intel® -VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality
  • -
-
- -
-

Mac

-
    -
  • Mac® OS X® 10.8.5 or higher, up to 10.11.4 (El Capitan)
  • -
  • 2 GB RAM minimum, 8 GB RAM recommended
  • -
  • 2 GB of available disk space minimum,
    4 GB Recommended -(500 MB for IDE + 1.5 GB for -Android SDK and emulator system image)
  • -
  • 1280 x 800 minimum screen resolution
  • -
  • Java Development Kit (JDK) 6
  • -
-
- -
-

Linux

-
    -
  • GNOME or KDE desktop -

    Tested on Ubuntu® 12.04, Precise Pangolin (64-bit distribution -capable of running 32-bit applications)

  • -
  • 64-bit distribution capable of running 32-bit applications
  • -
  • GNU C Library (glibc) 2.11 or later
  • -
  • 2 GB RAM minimum, 8 GB RAM recommended
  • -
  • 2 GB of available disk space minimum,
    4 GB Recommended -(500 MB for IDE + 1.5 GB for -Android SDK and emulator system image)
  • -
  • 1280 x 800 minimum screen resolution
  • -
  • Java Development Kit (JDK) 8
  • -
  • For accelerated emulator: Intel® processor with support for Intel® -VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality, -or AMD processor with support for AMD Virtualization™ (AMD-V™)
  • -
-
- -
-
- -
diff --git a/docs/html/sdk/installing/bundle.jd b/docs/html/sdk/installing/bundle.jd deleted file mode 100644 index 22bdd117ae24a..0000000000000 --- a/docs/html/sdk/installing/bundle.jd +++ /dev/null @@ -1,3 +0,0 @@ -page.title=Setting Up the ADT Bundle - -@jd:body diff --git a/docs/html/sdk/installing/create-project.jd b/docs/html/sdk/installing/create-project.jd deleted file mode 100644 index a4de85ceb7e2b..0000000000000 --- a/docs/html/sdk/installing/create-project.jd +++ /dev/null @@ -1,377 +0,0 @@ -page.title=Managing Projects with Android Studio - -@jd:body - -
- -
- - -

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.

- -

This guide explains how to create Android projects and different modules using -Android Studio. -For more information about the Android project structure and module types, read Managing Projects Overview.

- - - -

Creating an Android Project

- -

Android Studio makes it easy to create Android apps for several form factors, such as phone, -tablet, TV, Wear, and Google Glass. The New Project wizard lets you choose the form factors -for your app and populates the project structure with everything you need to get started.

- -

Follow the steps in this section to create a project in Android Studio.

- -

Step 1: Create a New Project

- -

If you didn't have a project opened, Android Studio shows the Welcome screen. -To create a new project, click New Project.

- -

If you had a project opened, Android Studio shows the development environment. -To create a new project, click File > New Project.

- -

The next window lets you configure the name of your app, the package name, and the location -of your project.

- - -

Figure 1. Choose a name for your project.

- -

Enter the values for your project then click Next.

- -

Step 2: Select Form Factors and API Level

- -

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 within the -project. For each form factor, you can also select the API Level for that app. To get more information, -click Help me choose.

- - -

Figure 2. Select the API Level.

- -

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 OK.

- - -

Figure 3. Choose form factors for your app.

- -

Then, on the Form Factors Window, click Next.

- - -

Step 3: Add an Activity

- -

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.

- - -

Figure 4. Add an activity to your app.

- -

Choose an activity type then click Next.

- -

Note: If you choose "Add No Activity", click Finish - to create the project.

- - -

Step 4: Configure Your Activity

- -

The next screen lets you configure the activity to add to your app, as shown in figure 5.

- - -

Figure 5. Choose a name for your activity.

- -

Enter the activity name, the layout name, and the activity title. Then click -Finish.

- - -

Step 5: Develop Your App

- -

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.

- - -

Figure 6. The default project structure for a mobile app.

- -

Now you are ready to develop your app. For more information, see the following links:

- - - - -

Creating an Android Module

- -

Android application modules contain the src/main/, AndroidManifest.xml, - build.gradle, build output and other files you need to generate your app's APK files. - Android Studio provides a New Module Wizard 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.

- -

To create a new module, select File > New > - Module. Select the desire module type then click Next to enter the basic module - settings:

- - - -

The wizard creates a new Android application module according to the options you have chosen.

- - - -

Setting up a Library Module

- -

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 Android - Library as the module type. The created library module will appear in your project view - along with the other modules.

- -

You can easily change an existing application module to a library module by changing the - plugin assignment in the build.gradle file to com.android.library.

- -
-apply plugin: 'com.android.application'
-
-android {...}
-
- -
-apply plugin: 'com.android.library'
-
-android {...}
-
- - -

Adding a dependency on a library module

- -

The library dependency can be declared in the module's manifest file or in the - file.

- -

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 - AndroidManifest.xml.

- -

For example, the TicTacToeLib example library - project declares the activity GameActivity:

-
-<manifest>
-  ...
-  <application>
-    ...
-    <activity android:name="GameActivity" />
-    ...
-  </application>
-</manifest>
-
- - -

To add the dependency declaration to the build file, edit the build file for the app -module (app/build.gradle) and add a dependency on the lib module:

- -
-...
-dependencies {
-    ...
-    compile project(":lib")
-}
-
- -

In this example, the lib 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.

- -

Note: The library settings in the app/build.gradle -file will override any shared library resources declared in the manifest file.

- - -

Referencing a library module

- -

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.

- -

To add a reference to a library module, follow these steps:

- -
    -
  1. Make sure that both the module library and the application module that depends on it are - in your project. If one of the modules is missing, import it into your project.
  2. - -
  3. In the project view, right-click the dependent module and select - Open > Module Settings.
  4. - -
  5. Right-click the plus icon to add a new dependencies. -

    If you are adding references to multiple libraries, you can set their relative - priority (and merge order) by selecting a library and using the Up and - Down 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.

    -
  6. - -
  7. Use the Scope drop-down to select how the dependency will be applied.
  8. - -
  9. Click Apply to create the dependency and OK to close the - Project Structure window.
  10. -
- -

Android Studio rebuilds the module, including the contents of the library module the next time - the project or module is built.

- - - -

Declaring library components in the manifest file

- -

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 <activity>, <service>, - <receiver>, <provider>, and so on, as well as - <permission>, <uses-library>, and similar elements.

- -

Declarations should reference the library components by their fully-qualified package names, - where appropriate.

- -

For example, the TicTacToeMain example - application declares the library activity GameActivity like this:

-
-<manifest>
-  ...
-  <application>
-    ...
-    <activity android:name="com.example.android.tictactoe.library.GameActivity" />
-    ...
-  </application>
-</manifest>
-
- -

For more information about the manifest file, see the documentation for AndroidManifest.xml.

- - -

Using the Android Project View

- - -

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 Gradle-based build system. The -Android project view:

- - - -

The Android project view is enabled by default and shows all the build files at -the top level of the project hierarchy under Gradle Scripts. The project module -appears as a folder at the top level of the project hierarchy and contains these three elements -at the top level:

- - - -

Notice how the Android project view groups all instances of the -ic_launcher.png resource for different screen densities under the same element.

- -

Note: 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 and maintains the traditional project structure.

- - -    - -

Figure 10: Android and Traditional project view

diff --git a/docs/html/sdk/installing/index.jd b/docs/html/sdk/installing/index.jd deleted file mode 100644 index e4d860b085c1d..0000000000000 --- a/docs/html/sdk/installing/index.jd +++ /dev/null @@ -1,218 +0,0 @@ -page.title=Install Android Studio -excludeFromSuggestions=true - -page.tags=sdk tools - -@jd:body - - - -
-

Instructions for

- -
- -

Setting up Android Studio takes just a few clicks.

- -

While the Android Studio download -completes, verify which version of the JDK you have: -open a command line and type javac -version. If the JDK -is not available or the version is lower than 1.8, download the Java SE Development Kit 8.

- - - - - - - - - - - - - - - - - - -

Note: -If you want to develop apps with the N Preview SDK, you must use -the preview version of Android Studio 2.1. For more information, see the -N Preview setup guide.

- - - -

Start building apps

- -
-
- -

Build your first app

-

Get started quickly and learn the basics of Android by following -the guide to Building Your First App.

- -
-
- -

Learn with Udacity

-

Ramp up on Android with interactive video training in the -Android Fundamentals Udacity course.

- -
-
- -

Explore Studio

-

Discover powerful Android Studio features and developer strategies in the -Android Studio Introduction.

- -
-
- - - diff --git a/docs/html/sdk/installing/migrate.jd b/docs/html/sdk/installing/migrate.jd deleted file mode 100644 index 61e6798dc0e55..0000000000000 --- a/docs/html/sdk/installing/migrate.jd +++ /dev/null @@ -1,267 +0,0 @@ -page.title=Migrating from Eclipse ADT - -@jd:body - -
- -
- - -

Migrating from Eclipse ADT to Android Studio requires adapting to a new project structure, -build system, and IDE functionality. To simplify the migration process, Android Studio provides an -import tool so you can quickly transition your Eclipse ADT workspaces and Ant build scripts to -Android Studio projects and Gradle-based build files.

- -

This document provides an overview of the migration process and walks you -through a sample import procedure. For more information about Android Studio features and the -Gradle-based build system, see Android Studio Overview -and Configuring Gradle Builds.

- - - -

Migration Overview

-

Migrating from Eclipse to Android Studio requires that you change the structure of your -development projects, move to a new build system, and use a new user interface. Here are some of -the key changes you should be aware of as you prepare to migrate to Android Studio:

- - - - - -

Migration Prerequisites

-

Before migrating your Eclipse ADT app to Android Studio, review the following steps to make -sure your project is ready for conversion, and verify you have the tool configuration you need in -Android Studio:

- - - - - -

Importing Projects to Android Studio

-

Android Studio provides a function for importing Eclipse ADT projects, which creates a new -Android Studio project and app modules based on your current -Eclipse ADT workspace and projects. No changes are made to your Eclipse project files. The Eclipse -ADT workspace becomes a new Android Studio project, and each Eclipse ADT project within the workspace -becomes a new Android Studio module. Each instance of Android Studio contains a project with one or -more app modules.

- -

After selecting an Eclipse ADT project to import, Android Studio creates the Android -Studio project structure and app modules, generates the new Gradle-based build files and settings, -and configures the required dependencies. The import options also allow you to enter your workspace -directory and any actual path maps to handle any unresolved relative paths, path variables, and -linked resource references.

- -

Depending on the structure of your Eclipse ADT development project, you should select specific -files for importing:

- - -

To import a project to Android Studio:

- -
    -
  1. Start Android Studio and close any open Android Studio projects.
  2. -
  3. From the Android Studio menu select File > New > Import Project. -

    Alternatively, from the Welcome screen, select Import project - (Eclipse ADT, Gradle, etc.).

  4. -
  5. Select the Eclipse ADT project folder with the AndroidManifest.xml file - and click Ok. -

    -
  6. -
  7. Select the destination folder and click Next. -

  8. -
  9. Select the import options and click Finish. -

    The import process prompts to migrate any library and project dependencies to Android Studio, - and add the dependency declarations to the build.gradle file. The import process - also replaces any well-known source libraries, binary libraries, and JAR files that have known - Maven coordinates with Maven dependencies, so you no longer need to maintain these dependencies - manually. The import options also allow you to enter your workspace directory and any actual - path maps to handle any unresolved relative paths, path variables, and linked resource - references.

    -

  10. - -
  11. Android Studio imports the app and displays the project import summary. Review the summary - for details about the project restructuring and the import process. -

    -
  12. -
- -

After importing the project from Eclipse ADT to the new Android Studio project and module -structure, each app module folder in Android Studio contains the complete source set for that -module, including the {@code src/main} and {@code src/androidTest} directories, resources, build -file, and Android manifest. Before starting app development, you should resolve any issues shown in -the project import summary to make sure the project re-structuring and import process completed -properly.

- - - -

Validating imported projects

-

After completing the import process, use the Android Studio Build and -Run menu options to build your project and verify the output. If your project -is not building properly, check the following settings:

- -