diff --git a/docs/html/preview/download.jd b/docs/html/preview/download.jd index 43e03c7ad6c7c..86f1dd4424226 100644 --- a/docs/html/preview/download.jd +++ b/docs/html/preview/download.jd @@ -188,14 +188,13 @@ This is the Android SDK Preview License Agreement (the “License Agreement”). -
To run the Android N Preview so you can test your apps, you can either +
To run the Android N Preview and test your apps, you can either install the Android N Preview on one of several supported devices or run it on the Android Emulator.
Simply installing your app onto Android N this way does not require any changes to your app source code. If, however, you want to update your -app to use new Android N APIs and Java 8 language features, -then you need to download Android Studio 2.1 (preview) as described in +app to use new Android N APIs, see Set Up to Develop for Android N. @@ -221,22 +220,19 @@ then you need to download Android Studio 2.1 (preview) as described in
- You can receive preview versions of Android on compatible devices by - enrolling them in the Android Beta Program. Once you enroll a device in - this program, it receives preview versions of Android over-the-air (OTA). - These updates are automatically downloaded and can installed just like - official updates. -
+You can receive over-the-air updates to preview versions of Android by +enrolling your compatible device in the Android Beta Program. +These updates are automatically downloaded and will update your device just like +official system updates.
- For more information on the Android Beta Program and to enroll devices, see + For more information and to enroll your device, see the Android Beta Program web site.
- Warning: If you enroll a device for receiving a preview - version of Android, and then later opt-out of receiving those updates on + Warning: If you enroll a device in the Android Beta Program, + then later opt-out of receiving updates on the device, all user data on that device will be removed.
@@ -247,7 +243,7 @@ then you need to download Android Studio 2.1 (preview) as described in the updates yourself, you can download the appropriate system image for your device from the table below. -The process of installing a system image on a device removes all data
+ Installing a system image on a device removes all data
from the device, so you should back up your data before installing a
system image.
- Warning: Installing a factory image causes all user data on - the device to be removed. + Warning: Just like when flashing a preview image, + installing a factory image removes all user data on the device.
@@ -364,13 +360,13 @@ preview system image, you must perform another manual installation.To use the Android Emulator to run the Android N Preview you need to download -the Android N Preview SDK and create a virtual device for the emulator. -
+To use the Android Emulator to run the Android N Preview, you need to +download the Android N Preview SDK and create a virtual device for the +emulator.
First, download the Android N Preview SDK as follows (if you already got it while setting up -Android Studio 2.1, you can skip this part): +to develop for Android N, you can skip this part):
You can now launch the Android Emulator with the Android N Preview AVD.
+Note: +For the best experience in the Android Emulator, install +Android Studio 2.1 Preview, which supports the Android Emulator 2.0 Beta +with much faster performance compared to the Emulator in +Android Studio 1.5.
+For more information about creating virtual devices, see Managing Virtual Devices.
diff --git a/docs/html/preview/images/studio-jdk-location.jpg b/docs/html/preview/images/studio-jdk-location.jpg new file mode 100644 index 0000000000000..1b1ba23577265 Binary files /dev/null and b/docs/html/preview/images/studio-jdk-location.jpg differ diff --git a/docs/html/preview/j8-jack.jd b/docs/html/preview/j8-jack.jd index 4745d89dca852..1f24530f0a379 100644 --- a/docs/html/preview/j8-jack.jd +++ b/docs/html/preview/j8-jack.jd @@ -1,61 +1,41 @@ -page.title=Using Java 8 Language Features +page.title=Java 8 Language Features page.keywords="android N", "Java 8", "Jack" @jd:bodyAndroid N introduces support for Java 8 language features - that you can use when developing apps that target the Android N. To start using - these features, you need to download and set up Android Studio 2.1 (preview) - and the Android N Preview SDK, which includes the required Jack toolchain and - updated Android Plugin for Gradle.
- -If you haven't yet installed the Android N Preview SDK, follow the guide to -Set Up to Develop for Android -N.
- - -- This document describes the new language features supported in the Android N + that you can use when developing apps that target Android N. + This page describes the new language features supported in the Android N Preview, how to properly set up your project to use them, and any known issues you may encounter.
+To start using these features, you need to download and set up Android +Studio 2.1 (preview) and the Android N Preview SDK, which includes the required +Jack toolchain and updated Android Plugin for Gradle. If you haven't yet +installed the Android N Preview SDK, see Set Up to Develop for Android N.
+ + +Note: Using the new Java 8 language features is not a - requirement for developing apps that target the Android N Preview. After - following the set up instructions in the Preview guide, you may use - the Java 7 language features already supported by Android 6.0 (API level 23) - and below. + requirement for developing apps that target the Android N platform. If you + don't want to write code with Java 8 language features, you can keep your + project's source and target compatibility values set to Java 7, but you still + must compile with JDK 8 to build against the Android N platform.
Android does not currently support all Java 8 language features. However, the - following features are now available when developing apps targeting the N - Developer Preview: + following features are now available when developing apps targeting the + Android N Preview:
- Additionally, the following Java 8 language feature APIs are now available - with the Preview: + Additionally, the following Java 8 language feature APIs are now available:
Here we compare the two toolchains used to build Android DEX files:
+Here is a comparison the two toolchains used to build Android DEX files:
android {
-...
- defaultConfig {
...
+ defaultConfig {
+ ...
jackOptions {
enabled true
}
@@ -192,19 +173,17 @@ android {
with Jack and will be disabled while using the new toolchain.
-
- Since Jack does not generate intermediate class files when compiling an app,
- tools that depend on these files do not currently work with Jack. Some examples of
- these tools are:
-
+Because Jack does not generate intermediate class files when compiling an
+app, tools that depend on these files do not currently work with Jack. Some
+examples of these tools are:
If you find other problems while using Jack, please report bugs.
\ No newline at end of file diff --git a/docs/html/preview/setup-sdk.jd b/docs/html/preview/setup-sdk.jd index 65be22042fe9c..e37834a310eba 100644 --- a/docs/html/preview/setup-sdk.jd +++ b/docs/html/preview/setup-sdk.jd @@ -25,7 +25,7 @@ page.image=images/cards/card-n-sdk_2x.pngTo develop apps for the Android N Preview, you need to make some updates to your developer environment, as described on this page.
-To instead simply test your app's compatibility on the +
To simply test your app's compatibility on the Android N system image, follow the guide to Test on an Android N Device.
@@ -34,11 +34,14 @@ href="{@docRoot}preview/download.html">Test on an Android N Device.The Android N platform adds support for Java 8 language features, -which are supported only with a new compiler called Jack. The latest Jack -compiler is currently supported only in Android Studio 2.1. So if you want to -use Java 8 language features, then you need to use Android Studio 2.1 to -build your app. +
The Android N platform adds support for Java 8 language features, +which require a new compiler called Jack. The latest version of Jack +is currently supported only in Android Studio 2.1. So if you want to +use Java 8 language features, you need to use Android Studio 2.1 to +build your app. Otherwise, you don't need to use the Jack compiler, but you +still need to update to JDK 8 to compile against the Android N platform, +as described below.
@@ -47,8 +50,8 @@ build your app. release channel. 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 -with Android N, leaving your primary Android Studio environment -unaffected. +for development with Android N, leaving your primary Android Studio +environment unaffected.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 @@ -85,8 +88,8 @@ existing installation, skip to step 4):
Android N Preview SDK in Android Studio as follows:@@ -140,25 +142,32 @@ Android N Preview SDK in Android Studio as follows:
You also need to update your JDK for Java 8 and install the - Java 8 Runtime Environment (JRE) 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 JRE 8 now.
+To compile your app against the Android N platform, you need to use +the Java 8 Developer Kit (JDK 8), and in order to use some tools with Android +Studio 2.1, you need to install the Java 8 Runtime Environment (JRE 8). So, if +you don't have the latest version of each already, download JDK 8 and JRE 8 +now.
-With Java 8 installed, set the JDK version in Android Studio as follows:
+Then set the JDK version in Android Studio as follows:
+
If you plan to use Java 8 language features, you should read -Using Java 8 Language Features -for information about how to configure your project and the supported -Java 8 features.
+If you plan to use Java 8 language features, you should also read +Java 8 Language Features +for information about the supported Java 8 features and +how to configure your project with the Jack compiler.