diff --git a/docs/html/preview/preview_toc.cs b/docs/html/preview/preview_toc.cs
index 406774fbec849..bcd430fc10d7c 100644
--- a/docs/html/preview/preview_toc.cs
+++ b/docs/html/preview/preview_toc.cs
@@ -20,17 +20,12 @@
ru-lang="Настройка пакета SDK Preview"
zh-cn-lang="设置预览版 SDK"
zh-tw-lang="設定預覽版 SDK">
- SDK Setup
+ Set Up to Develop
+
+
diff --git a/docs/html/preview/run-app.jd b/docs/html/preview/run-app.jd
new file mode 100644
index 0000000000000..226183cbb1451
--- /dev/null
+++ b/docs/html/preview/run-app.jd
@@ -0,0 +1,100 @@
+page.title=Run Your App on the N Preview
+meta.keywords="preview", "android"
+page.tags="preview", "developer preview"
+page.image=images/cards/card-n-sdk_2x.png
+
+@jd:body
+
+
+
+If you have an existing Android app and you simply want to run it on the N
+Preview system image, then you need either a virtual device or a supported
+hardware device configured with N Preview system image.
+
+Simply installing your app onto the N Preview this way does not require
+any changes to your app source code. If, however, you want to update your
+app to use new APIs in the N Preview and new language features of Java 8,
+then you need to download Android Studio 2.1 (preview) as described in
+Set Up to Develop for the
+N Preview.
+
+
So, although Android Studio 2.1 is required for development with N Preview
+APIs, you can use Android Studio 1.5 or higher if you simply want to run your
+app in the emulator or a connected device.
+
+
+Set up a Virtual Device
+
+To use the Android Emulator to run the N Preview you need to download
+the Android N Preview SDK and create a virtual device for the emulator.
+
+
+First, downloaded the Android N Preview SDK as follows (if you
+already got it while setting up
+Android Studio 2.1, you can skip this part):
+
+
+ - In Android Studio, open the Settings dialog
+ (File > Settings on Windows/Linux, or
+ Android Studio > Preferences on Mac). In the left
+ panel, select Appearance & Behavior >
+ System Settings > Android SDK.
+
+
- Click the SDK Platforms tab, then select the
+ Android N Preview check box.
+
+ - Click the SDK Tools tab, then select the
+ Android SDK Build Tools, Android SDK
+ Platform-Tools, and Android SDK Tools check
+ boxes.
+
+
+ - Click OK and accept the license
+ agreements for any packages to be installed.
+
+
+
+
+Now create a virtual device with the N Preview system image:
+
+
+ - Open the AVD Manager by selecting Tools > Android >
+ AVD Manager.
+ - Click Create Virtual Device.
+ - Select a device such as Nexus 5X, Nexus 6P, Nexus 9, or Android TV,
+ then click Next.
+ - Select the N system image (with the
+ x86 ABI), then click Next.
+
- Complete the rest of the AVD configuration and click
+ Finish.
+
+
+You can now launch the Android Emulator with the Android N Preview AVD.
+
+For more information about creating virtual devices, see Managing Virtual Devices.
+
+
+
+
+Set Up a Hardware Device
+
+If you have a Nexus 5X, Nexus 6P, Nexus 9, Pixel C, or Nexus Player, you can
+install the N Preview for testing your app.
+
+
+ Important: Installing a preview image on a device
+ removes all data from it, so you should backup any data before
+ installing a preview image.
+
+
+TODO(smain/joefernandez): Merge as appropriate with Image Downloads and OTA
+Updates.
diff --git a/docs/html/preview/setup-sdk.jd b/docs/html/preview/setup-sdk.jd
index ea5eaf6a2c0d6..7c6d251a7a7d3 100644
--- a/docs/html/preview/setup-sdk.jd
+++ b/docs/html/preview/setup-sdk.jd
@@ -1,4 +1,4 @@
-page.title=Set Up the SDK
+page.title=Set Up to Develop for the N Preview
meta.keywords="preview", "android"
page.tags="preview", "developer preview"
page.image=images/cards/card-n-sdk_2x.png
@@ -8,196 +8,166 @@ page.image=images/cards/card-n-sdk_2x.png
- You must have a development enviroment to make use of the Android N Developer
- Preview. This document describes how to setup and configure a development
- environment so you can use and test the Preview SDK.
+To develop apps for Android using new APIs in the N Preview and new language
+features of Java 8, you need to set up Android Studio 2.1 (preview) as described
+on this page.
+
+If you instead want to simply test your app's forward-compatibility on the
+Android N Preview system image, you can instead follow the guide to Run Your App on the N Preview.
+
+
+Get Android Studio 2.1 (preview)
+
+Developing for the Android N Preview platform requires Java 8 and a new
+compiler toolchain called JACK, which is currently supported only in
+Android Studio 2.1.
-
- This document assumes that you are familiar with Android app development,
- such as using the Android SDK Manager and creating projects. If you are new
- to Android, see
- Building Your First
- App training lesson first.
-
+Android Studio 2.1 is currently available as a preview in the canary
+release channel—it is still in development. If you already
+have Android Studio and don't want to update to the canary channel, you can
+download Android Studio 2.1 as a separate installation and use it
+for use with the N Preview, leaving your primary Android Studio environment
+unaffected.
-
-Get Android Studio 2.1
-
-
- The Developer Preview is best used with Android Studio 2.1, which is also in
- preview status. If you have an existing version of Android Studio you are
- using for development, you should install a separate instance of Android
- Studio for use with the Preview. This section describes how to install
- an instance of Android Studio and update to version 2.1.
-
-
-
- Caution: The canary preview of Android Studio 2.1 is still
- in active development. If you are using your primary development machine to
- test the developer preview, you should create a second installation of
- Android Studio to use for testing the Developer Preview.
-
-
-To install Android Studio and update to version 2.1:
+To download Android Studio 2.1 as a separate installation, follow these
+steps (or if you want to receive Android Studio 2.1 as an update to your
+existing installation, skip to step 4):
- - Download, install, and launch the current version of
- Android Studio.
+
- Edit the name of your
+ existing Android Studio installation and append the version number. This way,
+ when you install the new version, it will not override the existing one.
+ - Download the appropriate ZIP file for your operating system from the
+ canary channel download page.
-
- - In Android Studio, open the Settings dialog and in the left
- panel, choose Appearance & Behavior > System Settings >
+
- Unzip the package and move the Android Studio 2.1 contents to the
+ appropriate location for applications on your system, then launch it.
+ - Open the Settings dialog
+ (File > Settings on Windows/Linux, or
+ Android Studio > Preferences on Mac). In the left
+ panel, select Appearance & Behavior > System Settings >
Updates.
-
- - On Windows and Linux, open Settings by choosing
- File > Settings.
-
- - On Mac OS, open Settings by choosing
- Android Studio > Preferences.
-
-
-
- - On the Updates panel, make sure the Automatically
- check updates for option is selected and choose the
- Canary Channel option.
-
-
- - On the Updates panel, click Check Now
- to check for the latest canary build. Allow the software to download
- and install the canary version when prompted.
+
- On the Updates panel, select the Automatically
+ check updates for check box and select
+ Canary Channel from the drop-down list.
+Keep this settings window open for the next step.
-Get the Java 8 JDK
+
+Get the N Preview SDK
+
+Now add the N Preview SDK to your Android Studio 2.1 development
+ environment as follows:
+
+
+ - While still viewing the Updates panel from the previous
+ procedure, select the Automatically
+ check updates for Android SDK check box and select
+ Preview Channel from the drop-down list.
+
+ - Click Check Now.
+
+ - In the left panel, select Appearance & Behavior >
+ System Settings > Android SDK.
+
+
- Click the SDK Platforms tab, then select the
+ Android N Preview check box.
+
+ - Click the SDK Tools tab, then select the
+ Android SDK Build Tools, Android SDK
+ Platform-Tools, and Android SDK Tools check
+ boxes.
+
+
+ - Click OK, then accept the licensing
+ agreements for any packages that need to be installed.
+
+
+
+In addition to these preview components, you should download the
+N Preview developer docs from the following table. This is an offline version
+of the developer.android.com web site, except it includes the updated
+API reference for the N Preview APIs and an API difference report.
+
+
+
+ | Documentation |
+ Checksums |
+
+
+ |
+ n-preview-1-docs.zip |
+
+ MD5: xxxx
+ SHA-1: xxxx
+ |
+
+
+
+
+
+Get the Java 8 JDK and JRE
- You must use the Java 8 Development Kit with the N Developer Preview. If you
- do not have this version of the JDK installed, download and install it before
- working with the Preview SDK.
+ The Java 8 Development Kit (JDK) is required to develop apps with the Android
+ N Preview, and the Java 8 Runtime Environment (JRE) is required to run some
+ tools included in Android Studio 2.1.
+So, if you don't have the latest version of each already,
+download JDK 8 and
+download JRE 8 now.
-To set the JDK version in Android Studio:
+With Java 8 installed, set the JDK version in Android Studio as follows:
-
- - Make sure you have installed the Java 8 JDK, and make a note of its
- directory location on your development computer.
- - With a development project open in Android Studio, open the
- Project Structure dialog by choosing File >
+
+ - Open an Android project in Android Studio, then open the
+ Project Structure dialog by selecting File >
Project Structure.
- In the left panel of the dialog, click SDK Location.
- In the JDK Location field, enter the location of the
- Java 8 JDK, and click OK.
+ Java 8 JDK, then click OK.
-
-
-
-Get the Preview SDK
-
-To add the Preview SDK to your Android Studio 2.1 development
- environment:
-
-
- - Launch Android Studio 2.1.
-
-
- - In Android Studio, open the Settings dialog and in the left
- panel, choose Appearance & Behavior > System Settings >
- Updates.
-
- - On Windows and Linux, open Settings by choosing
- File > Settings.
-
- - On Mac OS, open Settings by choosing
- Android Studio > Preferences.
-
-
-
-
- - On the Updates panel, make sure the Automatically
- check updates for Android SDK option is selected and choose the
- Preview Channel option.
-
-
- - In the Settings dialog left panel, choose
- Appearance & Behavior > System Settings >
- Android SDK.
-
-
- - Click the SDK Platforms button, and then select
- Android N Preview.
-
-
- - Click the SDK Tools button, and select the latest
- Android SDK Tools, Platform-tools, and
- Build-tools versions.
-
-
- - Click OK and then accept the licensing
- agreements for the packages to be installed.
-
-After completing these steps, the preview components are available in your
- development environment.
-
-Create or Update a Project
+Update or Create a Project
- In order to use the preview APIs, you must create or update a development
- project to use the preview components.
+ To use the N Preview APIs, your project must be configured appropriately.
-Create a new project
-
-
- Use the Android Studio new project wizard to create a project. For detailed
- information on how to create a project with this too, see
- Creating a Project.
-
-
-To create a new project using the Preview SDK:
-
-
- - Start the New Project wizard and follow the steps until you reach the
- Target Android Devices page.
-
- - On this page, select Phone and Tablet option.
- - Under Phone and Tablet option, in the Minimum
- SDK option list, select Android N Preview.
-
-
-
Update an existing project
-
- For existing projects, you must modify the project configuration to use the
- Preview APIs. In your development environment, open the
- build.gradle file for your module and set these values as
+
Open the
+ build.gradle file for your module and update the values as
follows:
android {
compileSdkVersion 'android-N'
+ buildToolsVersion 24.0.0
...
defaultConfig {
@@ -210,59 +180,29 @@ android {
}
+Create a new project
-Set Up for Testing
-
- Testing an app with the preview requires that you have a device or virtual
- device configured with the preview version of the platform. If you have a
- compatible device, you can install the preview platform for testing.
- Otherwise, you can configure a virtual device for testing.
-
-
-Set up a physical device
-
-
- If you have a Nexus 5X, Nexus 6P, Nexus 9, or Nexus Player, you can install a
- preview system image on these devices for testing your app. You can set up a
- virtual device with the preview version of the platform from within Android
- Studio using the Android Virtual Device Manager tool.
-
-
-
- Important: Installing a preview image on a device
- removes all data from it, so you should backup any data before
- installing a preview image.
-
-
-Set up a virtual device
-
-
- You can set up virtual device with the preview version of the platform from
- within Android Studio using the Android Virtual Device Manager tool.
-
-
-To create an AVD with the AVD Manager:
+To create a new project for development with the N Preview SDK:
- - Install the Preview SDK in your development environment, as described
- in Setting Up the Preview
- SDK.
- - Follow the steps in
- Managing AVDs with AVD
- Manager. Use the following settings:
-
- - Device:
- Nexus 5X, Nexus 6P, Nexus 9, or Android TV
- - Target:
- Android N (Preview) - API Level N
- - ABI:
- x86
-
+ - Click File > New Project. and follow the steps until
+ you reach the Target Android Devices page.
+ - On this page, select Phone and Tablet option.
+ - Under Phone and Tablet option, in the Minimum
+ SDK option list, select
+ N: Android API 23, N Preview (Preview).
-
- For more information about creating virtual devices for testing, see Managing Virtual Devices.
-
+
+Next Steps
+
+Now that you've set up Android Studio 2.1 (preview), follow the guide
+to Run Your App on the N Preview.
+And learn more about the Android N Preview platform with
+Behavior Changes
+and Android N APIs
+and Features.
+