Merge "docs: Wear preview docs: Get Started, Download/Test, Program Overview" into mnc-io-docs
am: e8d7012fba
* commit 'e8d7012fbafb64e71fe2d94b4ef1cb466f63bfc9':
docs: Wear preview docs: Get Started, Download/Test, Program Overview
Change-Id: Icc722c4d00fc6862e28fc246cd376e90901c0092
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
page.title=Preview Downloads
|
page.title=Download and Test with a Device
|
||||||
meta.tags="wear-preview", "system image", "download"
|
meta.keywords="wear-preview"
|
||||||
page.tags="wear"
|
page.tags="wear-preview"
|
||||||
page.image=images/cards/card-n-downloads_2x.png
|
page.image=images/cards/card-n-sdk_2x.png
|
||||||
|
|
||||||
@jd:body
|
@jd:body
|
||||||
|
|
||||||
<div style="position:relative; min-height:600px">
|
<div style="position:relative; min-height:600px">
|
||||||
|
|
||||||
<div class="wrap" id="tos" style="position:absolute;display:none;width:inherit;">
|
<div class="wrap" id="tos" style="position:absolute;display:none;width:inherit;">
|
||||||
@@ -165,247 +164,395 @@ This is the Android Wear SDK Preview License Agreement (the “License Agreement
|
|||||||
|
|
||||||
<div id="landing">
|
<div id="landing">
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
<div id="qv-wrapper">
|
||||||
<div id="qv">
|
<div id="qv">
|
||||||
<h2>In this document</h2>
|
<ol>
|
||||||
<ol>
|
<li>
|
||||||
<li><a href="#device-preview">Set up a hardware device</a>
|
<a href="#set_up_a_watch">Set Up a Watch</a>
|
||||||
<ol>
|
</li>
|
||||||
<li><a href="#flash">Flash a device</a></li>
|
|
||||||
<li><a href="#revertDevice">Uninstalling the Preview</a></li>
|
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
<li><a href="#setupAVD">Set up an emulator</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
<li>
|
||||||
To run and test your app with the Wear Developer Preview, you need to set up
|
<a href="#set_up_an_emulator">Set Up an Emulator</a>
|
||||||
a runtime environment. You can do that in either of these ways:
|
</li>
|
||||||
</p>
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<ul>
|
<p>
|
||||||
<li>Install a Wear Preview system image on a supported hardware device,</li>
|
You can run and test your app with the Android Wear 2.0 Developer Preview
|
||||||
<li>Set up an Android emulator running the Wear Developer Preview</li>
|
in either of these ways:
|
||||||
</ul>
|
</p>
|
||||||
|
|
||||||
<p>
|
<ul>
|
||||||
If you want an environment for basic compatibility testing of your app on the
|
<li>Install Android Wear 2.0 on a supported watch, or
|
||||||
new platform, all you need is your current APK and a hardware device or
|
</li>
|
||||||
emulator. You don't necessarily need to update your full development
|
|
||||||
environment to do basic testing.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
<li>Set up an emulator that is running Android Wear 2.0
|
||||||
If you want to modify your app to target the Wear Preview or use the Wear
|
</li>
|
||||||
Preview APIs, you need to set up a development environment that's updated
|
</ul>
|
||||||
to support the Wear Preview. For more information, see
|
|
||||||
<a href="{@docRoot}wear/preview/start.html">Get Started with Wear Preview</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
If you want an environment for basic <strong>compatibility
|
||||||
|
testing</strong> of your app, you can use your current APK and a
|
||||||
|
supported watch or an emulator. As described below, you don't necessarily
|
||||||
|
need to update your full development environment to do basic testing.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h2 id="downloads">Download Files</h2>
|
<p>
|
||||||
|
However, if you want to <strong>modify</strong> your app to target
|
||||||
|
Android Wear 2.0 or use new APIs, you need to update your development
|
||||||
|
environment. See <a href="{@docRoot}wear/preview/start.html">Get Started
|
||||||
|
with the Android Wear 2.0 Preview</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2 id="set_up_a_watch">
|
||||||
|
Set Up a Watch
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
You can download a system image and manually flash it to a matching
|
||||||
|
watch. See the table below to download the system image for your test
|
||||||
|
watch.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3 id="docs-dl">Reference documentation</h3>
|
<p>
|
||||||
|
Manually flashing a watch is useful if you need precise control over the
|
||||||
|
test environment or need to reinstall frequently, such as for automated
|
||||||
|
testing.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Detailed information about the Wear Preview APIs is available in the
|
Installing a system image on a watch <strong>removes all data from the
|
||||||
reference documentation, which you can download from the following table.
|
watch</strong>, so you should back up your data first.
|
||||||
This package contains an abridged, offline version of the Android developer
|
</p>
|
||||||
web site, and includes an updated API reference for the Wear Preview APIs
|
|
||||||
and an API difference report.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<table>
|
<h3 id="preview_system_images">
|
||||||
<tr>
|
Preview system images
|
||||||
<th scope="col">Documentation</th>
|
</h3>
|
||||||
<th scope="col">Checksums</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="white-space: nowrap">
|
|
||||||
<a href="{@docRoot}shareables/preview/n-preview-1-docs.zip"
|
|
||||||
>n-preview-1-docs.zip</a></td>
|
|
||||||
<td width="100%">
|
|
||||||
MD5: 4ab33ccbe698f46f125cc5b807cf9c2f<br>
|
|
||||||
SHA-1: 6a3880b3ccd19614daae5a4d0698ea6ae11c20a5
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<table>
|
|
||||||
|
|
||||||
<h3 id="images-dl">Device system images</h3>
|
<p>
|
||||||
|
The preview includes system images for testing your app. Based on your
|
||||||
|
device, you can download a preview system image from the following tables
|
||||||
|
and flash it to the corresponding device.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>
|
<h4 id="preview_image_for_lge_watch_urbane_2nd_edition">
|
||||||
The following device system images can be used to update a compatible device
|
Preview image for LGE Watch Urbane 2nd Edition
|
||||||
with the Wear Preview for testing. For information on installing these
|
</h4>
|
||||||
images, see <a href="#device-preview">Set up a Hardware Device</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<table>
|
<p>
|
||||||
<tr>
|
<strong>Please note the following:</strong>
|
||||||
<th scope="col">Device</th>
|
Flashing your device will
|
||||||
<th scope="col">Download / Checksums</th>
|
require unlocking the bootloader which may
|
||||||
</tr>
|
void the device's warranty--proceed at your own risk.
|
||||||
|
</p>
|
||||||
|
|
||||||
<tr id="sprat">
|
<table>
|
||||||
<td>Gear Live <br>"sprat"</td>
|
<tr>
|
||||||
<td><a href="#top" onclick="onDownload(this)"
|
<th scope="col">
|
||||||
>sprat-XXXXX-preview-d86c7559.tgz</a><br>
|
Type of LGE Watch Urbane 2nd Edition image
|
||||||
MD5: d84b6c31a7754e505149594887b3481a<br>
|
</th>
|
||||||
SHA-1: d86c7559c93724cca6af91040b012c48529f2c94
|
<th scope="col">
|
||||||
</td>
|
Download/Checksums
|
||||||
</tr>
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tr id="download-3-placeholder">
|
||||||
|
<td>
|
||||||
|
Preview image for testing
|
||||||
|
</td>
|
||||||
|
<td><a href="#top" onclick="onDownload(this)">download-3-placeholder.tgz</a><br>
|
||||||
|
MD5: [string]<br>
|
||||||
|
SHA-1: [string]
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="download-4-placeholder">
|
||||||
|
<td>
|
||||||
|
Non-preview image (for after testing)
|
||||||
|
</td>
|
||||||
|
<td><a href="#top" onclick="onDownload(this)">download-4-placeholder.tgz</a><br>
|
||||||
|
MD5: [string]<br>
|
||||||
|
SHA-1: [string]
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
</table>
|
<h4 id="preview_image_for_huawei_watch">
|
||||||
|
Preview image for Huawei Watch
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>Please note the following:</strong>
|
||||||
|
Flashing your device will require unlocking
|
||||||
|
the bootloader which
|
||||||
|
shall void the device's warranty--proceed at your own risk.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">
|
||||||
|
Type of Huawei Watch image
|
||||||
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
Download/Checksums
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tr id="download-1-placeholder">
|
||||||
|
<td>
|
||||||
|
Preview image for testing
|
||||||
|
</td>
|
||||||
|
<td><a href="#top" onclick="onDownload(this)">download-1-placeholder.tgz</a><br>
|
||||||
|
MD5: [string]<br>
|
||||||
|
SHA-1: [string]
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="download-2-placeholder">
|
||||||
|
<td>
|
||||||
|
Non-preview image (for after testing)
|
||||||
|
</td>
|
||||||
|
<td><a href="#top" onclick="onDownload(this)">download-2-placeholder.tgz</a><br>
|
||||||
|
MD5: [string]<br>
|
||||||
|
SHA-1: [string]
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<h2 id="device-preview">Set up a Hardware Device</h2>
|
<h3 id="flash_a_watch">
|
||||||
|
Flash a watch
|
||||||
|
</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The Wear Developer Preview offers system updates for a range of hardware devices
|
The steps for flashing an image to a watch are similar to the <a href=
|
||||||
that you can use for testing your app, from phones to tablets and TV.
|
"https://developers.google.com/android/nexus/images">steps provided for
|
||||||
</p>
|
flashing to a phone</a>. After you <strong>back up your watch
|
||||||
|
data</strong>, use steps in this section to flash the image to the
|
||||||
|
<strong>specific watch</strong> that matches the image (e.g., you must
|
||||||
|
use an LGE Watch Urbane 2nd Edition for the corresponding image).
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h4 id="set_up_the_watch_to_be_flashed">
|
||||||
|
Set up the watch to be flashed
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
On the watch, enable the Developer Options menu and ADB debugging as
|
||||||
|
follows:
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3 id="flash">Flash a device</h3>
|
<ol>
|
||||||
|
<li>Open the Settings menu on the watch.
|
||||||
|
</li>
|
||||||
|
|
||||||
<p>
|
<li>Scroll to the bottom of the menu. If no <strong>Developer
|
||||||
At any time you can download the latest Developer Preview system image and
|
Options</strong> item is provided, tap <strong>About</strong>.
|
||||||
manually flash it to your device. See the table below to download the system
|
</li>
|
||||||
image for your test device. Manually flashing a device is useful if you need
|
|
||||||
precise control over the test environment or need to reinstall frequently,
|
|
||||||
such as for automated testing.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
<li>Tap the build number 7 times.
|
||||||
Installing a system image on a device <strong>removes all data from the
|
</li>
|
||||||
device</strong>, so you should back up your data first.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
<li>From the Settings menu, tap the <strong>Developer Options</strong>
|
||||||
After you back up your device data and download the system image below that
|
item.
|
||||||
matches your device, follow the instructions at <a href=
|
</li>
|
||||||
"https://developers.google.com/android/nexus/images#instructions">developers.google.com/android</a>
|
|
||||||
to flash the image onto your device.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
<li>Enable ADB debugging.
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
<h3 id="revertDevice">Uninstalling the Preview</h3>
|
<h4 id="confirm_installation_of_the_fastboot_tool">
|
||||||
|
Confirm installation of the fastboot tool
|
||||||
|
</h4>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you want to uninstall the preview from a device, you can do so in one of
|
To flash a device using one of the <a href=
|
||||||
these ways: </p>
|
"#preview_system_images">system images</a>, confirm that you have the
|
||||||
<ul>
|
<code>fastboot</code> tool in the <code>platform-tools/</code> directory
|
||||||
<li><strong>Obtain a factory spec system image</strong> and then manually
|
of the <a href="https://developer.android.com/sdk">Android SDK</a>. Be
|
||||||
flash it to the device.
|
sure that you have the latest version of the <strong>Android SDK
|
||||||
<ul>
|
Platform-tools</strong> from the <a href=
|
||||||
<li>For <strong>Nexus devices and Pixel C devices</strong>, see
|
"{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>.
|
||||||
the <a href="http://developers.google.com/android/nexus/images">Factory Images
|
</p>
|
||||||
for Nexus Devices</a> page for downloads. </li>
|
|
||||||
<li>For <strong>other devices</strong>, please contact the device manufacturer
|
|
||||||
directly. Alternatively, if the device is supported
|
|
||||||
in the Android Beta Program, you can enroll the device in the
|
|
||||||
program and then un-enroll it (see below).</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><strong>Un-enroll the device from Android Beta Program</strong>. If the
|
|
||||||
device is enrolled in the <a href="https://g.co/androidbeta">Android Beta
|
|
||||||
Program</a>, regardless of device, you can simply un-enroll it from the program.
|
|
||||||
<p>
|
|
||||||
The device will receive an OTA update to the most recent production version
|
|
||||||
of Android available for that device (for example, Android 6.0 Marshmallow).
|
|
||||||
The update requires a full device reset, so user data on the device will be
|
|
||||||
removed. Make sure to <strong>back up important data</strong> before
|
|
||||||
un-enrolling a device.
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note:</strong>
|
<p>
|
||||||
Uninstalling a Developer Preview system image prior to
|
After you confirm that you have the <code>fastboot</code> tool, add the
|
||||||
the end of the program requires a full device reset and removes all user data
|
tool to your PATH environment variable so the tool can be found when you
|
||||||
on the device.
|
flash the watch.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<h4 id="transfer_the_image_to_the_watch">
|
||||||
|
Transfer the image to the watch
|
||||||
|
</h4>
|
||||||
|
|
||||||
<h2 id="setupAVD">Set up an emulator</h2>
|
<p>
|
||||||
|
To download a preview image and flash it to the watch:
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>To use the Android Emulator to run the Wear Preview, you need to
|
<ol>
|
||||||
download the Wear Preview SDK and create a virtual device for the
|
<li>Download and unzip the appropriate system image from the "Preview
|
||||||
emulator.</p>
|
system image" column in the <a href="#preview_system_images">table
|
||||||
|
above</a>.
|
||||||
|
</li>
|
||||||
|
|
||||||
<p>First, download the Wear Preview SDK as follows (if you
|
<li>Attach the watch charger to the watch and plug the USB cord (from the
|
||||||
already got it while <a href="{@docRoot}preview/setup-sdk.html">setting up
|
charger) into your computer.
|
||||||
to develop for Android N</a>, you can skip this part):
|
</li>
|
||||||
|
|
||||||
<ol>
|
<li>Use the following <a href="{@docRoot}tools/help/adb.html">adb
|
||||||
<li>In Android Studio, open the Settings dialog
|
command</a> to confirm that the watch is available for flashing:
|
||||||
(<strong>File > Settings</strong> on Windows/Linux, or
|
<code>adb devices</code>
|
||||||
<strong>Android Studio > Preferences</strong> on Mac). In the left
|
</li>
|
||||||
panel, select <strong>Appearance & Behavior >
|
|
||||||
System Settings > Android SDK</strong>.
|
|
||||||
|
|
||||||
<li>Click the <strong>SDK Platforms</strong> tab, then select the
|
<li>Use the following adb command to start the device in fastboot mode:
|
||||||
<strong>Wear Preview</strong> check box.</li>
|
<code>adb reboot bootloader</code>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>Click the <strong>SDK Tools</strong> tab, then select the
|
<li>If necessary, use <strong>one</strong> of following two commands to
|
||||||
<strong>Android SDK Build Tools</strong>, <strong>Android SDK
|
unlock the device's bootloader. This step <strong>erases all data on the
|
||||||
Platform-Tools</strong>, and <strong>Android SDK Tools</strong> check
|
device</strong>: <code>fastboot flashing unlock</code> or, for some
|
||||||
boxes.
|
devices, <code>fastboot oem unlock</code>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>Click <strong>OK</strong> and accept the license
|
<li>Navigate to the directory where you unzipped the system image in Step
|
||||||
agreements for any packages to be installed.
|
1.
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>You should now have <strong>Android SDK Built-Tools 24.0 0 rc1</strong>,
|
<li>Execute the <code>flash-all</code> script by typing
|
||||||
<strong>Platform-Tools 24.0.0 rc1</strong>, and <strong>SDK Tools
|
<code>flash-all.sh</code> or, in the case of Windows,
|
||||||
25.0.9</strong>. If you do not update the SDK Tools to 25.0.9, then you won't
|
<code>flash-all.bat</code>.
|
||||||
be able to run the x86_64 system images for Android N.</p>
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
After the script finishes, your watch reboots. Pair the watch with a
|
||||||
|
phone or tablet. The preview now is available for testing on the watch.
|
||||||
|
Before installing an app, enable the Developer Options menu, and ADB
|
||||||
|
debugging, on the watch as follows:
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>Now create a virtual device with the Wear Preview system image:</p>
|
<ol>
|
||||||
|
<li>Open the Settings menu (on the watch).
|
||||||
|
</li>
|
||||||
|
|
||||||
<ol>
|
<li>Scroll to the bottom of the menu and tap <strong>About</strong>.
|
||||||
<li>Open the AVD Manager by selecting <strong>Tools > Android >
|
</li>
|
||||||
AVD Manager</strong>.</li>
|
|
||||||
<li>Click <strong>Create Virtual Device</strong>.</li>
|
|
||||||
<li>Select a device such as Nexus 5X, Nexus 6P, Nexus 9, or Android TV,
|
|
||||||
then click <strong>Next</strong>.</li>
|
|
||||||
<li>Select the <strong>N</strong> system image (with the
|
|
||||||
<strong>x86</strong> ABI), then click <strong>Next</strong>.
|
|
||||||
(Only x86 system images are currently supported with the Android Emulator
|
|
||||||
for the Wear Preview.)
|
|
||||||
<li>Complete the rest of the AVD configuration and click
|
|
||||||
<strong>Finish</strong>.</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>You can now launch the Android Emulator with the Wear Preview AVD.</p>
|
<li>Tap the build number 7 times.
|
||||||
|
</li>
|
||||||
|
|
||||||
<p>
|
<li>From the Settings menu, tap the <strong>Developer Options</strong>
|
||||||
For the best experience in the Android Emulator, install
|
item.
|
||||||
Android Studio 2.2 Preview, which supports the <a
|
</li>
|
||||||
href="http://tools.android.com/tech-docs/emulator">Android Emulator 2.0 Beta</a>
|
|
||||||
with much faster performance compared to the Emulator in
|
|
||||||
Android Studio 1.5.</p>
|
|
||||||
|
|
||||||
<p>For more information about creating virtual devices, see <a href=
|
<li>Enable ADB debugging.
|
||||||
"{@docRoot}tools/devices/index.html">Managing Virtual Devices</a>.
|
</li>
|
||||||
</p>
|
|
||||||
|
|
||||||
|
<li>Connect the watch to your computer and tap <strong>Always allow from
|
||||||
|
this computer</strong>.
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Your watch is ready for you to <a href=
|
||||||
|
"{@docRoot}training/wearables/apps/creating.html#Install">install and run
|
||||||
|
your app</a>:
|
||||||
|
</p>
|
||||||
|
|
||||||
</div><!-- landing -->
|
<ol>
|
||||||
|
<li>Open your app in Android Studio.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Select <strong>wear</strong> from the Run/Debug configuration
|
||||||
|
drop-down menu.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Click the Play button.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>In the Select Deployment Target box, click your device.
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
After your app is installed on the watch, you are prompted to start the
|
||||||
|
app on the watch.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
When testing is completed, follow the steps for <a href=
|
||||||
|
"#uninstall_the_preview_from_a_watch">uninstalling the preview</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3 id="uninstall_the_preview_from_a_watch">
|
||||||
|
Uninstall the preview from a watch
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
When testing with the preview is done, restore the watch as follows:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
<li>Download and unzip the appropriate system image from the "Non-preview
|
||||||
|
system image" column in the <a href="#preview_system_images">table
|
||||||
|
above</a>.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Manually flash the image to the watch using steps similar to those in
|
||||||
|
<a href="#transfer_the_image_to_the_watch">Transfer the image to the
|
||||||
|
watch</a>, except that you flash the <strong>non-preview</strong> image
|
||||||
|
to the watch.
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>Note</strong>: Removing a preview system image requires a full
|
||||||
|
device reset and removes all user data on the device.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2 id="set_up_an_emulator">
|
||||||
|
Set Up an Emulator
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
To test with the Android Emulator, create a virtual device in Android
|
||||||
|
Studio as follows:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
<li>Open the AVD Manager by selecting <strong>Tools > Android > AVD
|
||||||
|
Manager</strong>.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Click <strong>Create Virtual Device</strong>.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>In the <strong>Category</strong> pane, select Wear, choose a name
|
||||||
|
(such as Android Wear Round), and click <strong>Next</strong>.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Select an <strong>N</strong> image to download. The images may be on
|
||||||
|
the <strong>x86</strong> tab instead of the <strong>Recommended</strong>
|
||||||
|
tab, until installed. For example, select the image with the
|
||||||
|
<strong>Release Name</strong> of N, the <strong>API Level</strong> of N,
|
||||||
|
and the <strong>Target</strong> of "Android 6.X (with Android Wear)".
|
||||||
|
When the download and installation are complete, click
|
||||||
|
<strong>Finish</strong> and then click <strong>Next</strong>.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Verify the configuration of the Android Virtual Device (AVD) and
|
||||||
|
click <strong>Finish</strong>.
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
You can now test an application in the <a href=
|
||||||
|
"{@docRoot}tools/devices/emulator.html">Android Emulator</a>. For more
|
||||||
|
information about using virtual devices, see <a href=
|
||||||
|
"{@docRoot}tools/devices/managing-avds.html">Managing AVDs with the AVD
|
||||||
|
Manager</a>.
|
||||||
|
</p>
|
||||||
|
</div><!-- landing -->
|
||||||
|
|
||||||
</div><!-- relative wrapper -->
|
</div><!-- relative wrapper -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var urlRoot = "http://storage.googleapis.com/androiddevelopers/shareables/wear/preview/";
|
var urlRoot = "http://storage.googleapis.com/androiddevelopers/shareables/wear/preview/";
|
||||||
function onDownload(link) {
|
function onDownload(link) {
|
||||||
@@ -454,4 +601,4 @@ Android Studio 1.5.</p>
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@@ -1,62 +1,255 @@
|
|||||||
page.title=Preview Program Overview
|
page.title=Android Wear Preview Program Overview
|
||||||
page.metaDescription=Get your apps ready for the next version of Android.
|
meta.keywords="wear-preview"
|
||||||
page.image=images/cards/card-n-overview_2x.png
|
page.tags="wear-preview"
|
||||||
meta.tags="wear", "wear-preview"
|
page.image=images/cards/card-n-sdk_2x.png
|
||||||
page.tags="wear"
|
|
||||||
|
|
||||||
@jd:body
|
@jd:body
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Welcome to the Android Wear 2.0 Developer Preview! This program gives you
|
||||||
|
everything you need to get started with the next version of Android Wear.
|
||||||
|
It’s free, and you can get started right away by downloading the
|
||||||
|
Developer Preview resources.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>
|
<h3 id="program_highlights">
|
||||||
Welcome to the <strong>Wear Developer Preview</strong>, a program that
|
Program Highlights
|
||||||
gives you everything you need to test and optimize your apps for the next
|
</h3>
|
||||||
version of Android Wear. It's free, and you can get started right away just by
|
|
||||||
downloading the Wear Developer Preview tools.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
<div style="background-color:#eceff1;padding:1em;">
|
||||||
|
<div class="wrap">
|
||||||
|
<div class="cols">
|
||||||
|
<div class="col-4of12">
|
||||||
|
<h5>
|
||||||
|
Hardware and emulator images
|
||||||
|
</h5>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Run and test your apps on a range of devices or on an emulator.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h2 id="timeline">Timeline and updates</h2>
|
<div class="col-4of12">
|
||||||
|
<h5>
|
||||||
|
Latest platform code
|
||||||
|
</h5>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Lorem ipsum dolor sit amet, consul graecis gloriatur in cum. Porro noster ea
|
We’ll provide monthly updates during the preview, so you'll be
|
||||||
nam, omnes tollit facete ut vix. Ut nibh ancillae mei, unum mollis aliquid an
|
testing against the latest platform changes.
|
||||||
pri. No melius dignissim mel. An eum erant dicit volumus, ut eum animal
|
</p>
|
||||||
convenire.
|
</div>
|
||||||
</p>
|
|
||||||
|
|
||||||
|
<div class="col-4of12">
|
||||||
|
<h5>
|
||||||
|
Priority for developer issues
|
||||||
|
</h5>
|
||||||
|
|
||||||
<h2 id="preview_tools">What's in the Wear Developer Preview?</h2>
|
<p>
|
||||||
|
During the first several weeks, we'll give priority to
|
||||||
|
developer-reported issues, so test and give feedback as soon as
|
||||||
|
possible.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p>
|
<div class="cols">
|
||||||
Lorem ipsum dolor sit amet, consul graecis gloriatur in cum. Porro noster ea
|
<div class="col-4of12">
|
||||||
nam, omnes tollit facete ut vix. Ut nibh ancillae mei, unum mollis aliquid an
|
<h5>
|
||||||
pri. No melius dignissim mel. An eum erant dicit volumus, ut eum animal
|
New behaviors and capabilities
|
||||||
convenire.
|
</h5>
|
||||||
</p>
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Start work early to support new platform behaviors such as
|
||||||
|
complications and Material Design for Wear.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h2 id="how_to_get_started">How to get started</h2>
|
<div class="col-4of12">
|
||||||
|
<h5>
|
||||||
|
Feedback and support
|
||||||
|
</h5>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
To get started testing your app with the Wear Developer Preview:
|
Report issues and give us feedback using our issue tracker.
|
||||||
</p>
|
Connect with other developers in the Wear Developer Community.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<ol>
|
<div class="col-4of12">
|
||||||
<li> Review the <a href="{@docRoot}wear/preview/api-overview.html">API
|
</div>
|
||||||
Overview</a> to
|
</div>
|
||||||
get an idea of what's new and how it affects your apps.</li>
|
</div>
|
||||||
<li>Download the preview API documentation and system images from the
|
</div>
|
||||||
<a href="{@docRoot}wear/preview/downloads.html">Preview Downloads</a>
|
|
||||||
</li>
|
|
||||||
<li> Set up your environment by following the instructions for <a
|
|
||||||
href="{@docRoot}wear/preview/start.html">Get Started with Wear Preview</a>
|
|
||||||
and configuring test devices.</li>
|
|
||||||
<li> Join the <a href="http://g.co/androidweardev">Android Wear
|
|
||||||
Developer Community</a> to get the latest news and connect with other
|
|
||||||
developers working with the new platform.</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>
|
<h2 id="timeline_and_updates">
|
||||||
Thank you for participating in the Android Wear Developer Preview program!
|
Timeline and Updates
|
||||||
</p>
|
</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The Android Wear 2.0 Developer Preview runs from 18 May 2016 until the
|
||||||
|
final Android Wear public release to OEMs, planned for Q4 2016.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
At key development milestones, we'll deliver updates for your development
|
||||||
|
and testing environment. In general you can expect updates in
|
||||||
|
approximately 6-week intervals. The release milestones are:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Milestone 1 (initial release, alpha)
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Milestone 2 (incremental update, beta)
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Milestone 3 (incremental update, beta)
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Milestone 4 (final APIs and official SDK, Play publishing)
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Near-final system image
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Final release to OEMs
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Each update includes an updated support library, preview system images,
|
||||||
|
emulator, reference documentation, and API diffs.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The first three milestones provide an early test and development
|
||||||
|
environment to helps you identify compatibility issues in your current
|
||||||
|
apps and plan migration or feature work needed to target the new
|
||||||
|
platform. This is the priority period in which to give us your feedback
|
||||||
|
on features and APIs and file compatibility issues — for all of these,
|
||||||
|
please use the issue tracker. You can expect some API changes across
|
||||||
|
these updates.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
At milestones 4 and 5 you'll have access to the final Android Wear 2.0
|
||||||
|
APIs and SDK to develop with, as well as near-final system images to test
|
||||||
|
system behaviors and features. Android Wear 2.0 will use the Android N
|
||||||
|
API level at this time. You can begin final compatibility testing of your
|
||||||
|
legacy apps and refine any new code that is using the Android Wear 2.0
|
||||||
|
APIs or features.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
As you test and develop on Android Wear 2.0, we strongly recommend
|
||||||
|
keeping your development environment up-to-date as updates are released.
|
||||||
|
Updated preview images will be available that you can download and flash
|
||||||
|
manually.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
We'll notify you when updates are available via the Android Developers
|
||||||
|
Blog, as well as via this site and the <a href=
|
||||||
|
"http://g.co/androidweardev">Android Wear Developer Community on G+</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2 id="what's_in_the_android_wear_2_0_developer_preview">
|
||||||
|
What's in the Android Wear 2.0 Developer Preview
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The preview includes everything you need to test your existing apps on a
|
||||||
|
variety of hardware configurations.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3 id="developer_resources">
|
||||||
|
Developer resources
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
You can download these components through the SDK Manager in <a href=
|
||||||
|
"{@docRoot}sdk/installing/adding-packages.html">Android Studio</a>. For
|
||||||
|
more information, see <a href=
|
||||||
|
"{@docRoot}wear/preview/downloads.html">Download and Test with a
|
||||||
|
Device</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Android Wear 2.0 Developer Preview <strong>SDK/support
|
||||||
|
library</strong>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Android Wear 2.0 Developer Preview <strong>emulator system
|
||||||
|
image</strong>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
We'll provide updates to these development tools at each milestone as
|
||||||
|
needed.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3 id="hardware_system_images">
|
||||||
|
Hardware system images
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
You can download these hardware system images for Nexus devices from the
|
||||||
|
Downloads page:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>LG Watch Urbane 2nd Edition “nemo”
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Huawei Watch “sturgeon”
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3 id="documentation_and_sample_code">
|
||||||
|
Documentation and sample code
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
These documentation resources help you learn about the preview:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>[comment placeholder] Get Started has step-by-step instructions for
|
||||||
|
setting up the SDK.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Documentation of new APIs, including an API Overview, downloadable
|
||||||
|
API Reference, and developer guides on key features such as
|
||||||
|
complications, design patterns for Wear, and building standalone Android
|
||||||
|
Wear apps.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Sample code that demonstrates how to implement [comment placeholder]
|
||||||
|
complications and other new features.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3 id="support_resources">
|
||||||
|
Support Resources
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Use these support resources as you test and develop on the Android Wear
|
||||||
|
2.0 Developer Preview:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Wear Developer Preview Issue Tracker is your primary feedback
|
||||||
|
channel. You can report bugs, performance issues, and general feedback
|
||||||
|
through the issue tracker. You can also check for known issues and find
|
||||||
|
workaround steps.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>The <a href="http://g.co/androidweardev">Wear Developer Community</a>
|
||||||
|
is a Google+ community where you can connect with other developers
|
||||||
|
working with Android Wear. You can share observations or ideas or find
|
||||||
|
answers to questions about Android Wear.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
page.title=Get Started with Wear Preview
|
page.title=Get Started with the Android Wear 2.0 Developer Preview
|
||||||
meta.keywords="wear-preview"
|
meta.keywords="wear-preview"
|
||||||
page.tags="wear-preview"
|
page.tags="wear-preview"
|
||||||
page.image=images/cards/card-n-sdk_2x.png
|
page.image=images/cards/card-n-sdk_2x.png
|
||||||
@@ -6,134 +6,205 @@ page.image=images/cards/card-n-sdk_2x.png
|
|||||||
@jd:body
|
@jd:body
|
||||||
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
<div id="qv-wrapper">
|
||||||
<div id="qv">
|
<div id="qv">
|
||||||
<ol>
|
<ol>
|
||||||
<li><a href="#get-as22">Get Android Studio 2.2</a></li>
|
<li>
|
||||||
<li><a href="#get-sdk">Get the Wear Preview SDK</a></li>
|
<a href="#install_android_studio_and_the_latest_packages">Install
|
||||||
<li><a href="#create-update">Update or Create a Project</a></li>
|
Android Studio and the Latest Packages</a>
|
||||||
</ol>
|
</li>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
<li>
|
||||||
To develop apps for the Wear Developer Preview, you need to make some updates
|
<a href="#get_the_preview_reference_documentation">Get the Preview
|
||||||
to your developer environment. This page describes how to setup for testing
|
Reference Documentation</a>
|
||||||
the Wear Preview APIs with your app.
|
</li>
|
||||||
</p>
|
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="#update_or_create_a_project">Update or Create a
|
||||||
|
Project</a>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h2 id="get-as22">Get Android Studio 2.2 (preview)</h2>
|
<p>
|
||||||
|
If you want an environment for basic <strong>compatibility
|
||||||
|
testing</strong> of your app, you can use your current APK and a
|
||||||
|
supported watch or an emulator. You don't necessarily need to update your
|
||||||
|
full development environment to do basic testing. To simply test your
|
||||||
|
app's compatibility with a preview system image, see <a href=
|
||||||
|
"{@docRoot}wear/preview/downloads.html">Download and Test with a
|
||||||
|
Device</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Android Studio 2.2 is currently available as a preview in the canary release
|
However, to develop apps for the Android Wear 2.0 Developer Preview, you
|
||||||
channel. If you already have Android Studio and don't want to update to the
|
need to make some updates to your development environment, as described
|
||||||
canary channel, you can download Android Studio 2.2 as a separate
|
below.
|
||||||
installation and use it for development with the Wear Developer Preview,
|
</p>
|
||||||
leaving your primary Android Studio environment unaffected.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
<h2 id="install_android_studio_and_the_latest_packages">
|
||||||
To download Android Studio 2.2 as a separate installation, follow these steps
|
Install Android Studio and the Latest Packages
|
||||||
(or if you want to receive Android Studio 2.1 as an update to your existing
|
</h2>
|
||||||
installation, skip to step 4):
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ol>
|
<p>
|
||||||
<li>Edit the name of your
|
1. For compatibility with the <a href="{@docRoot}preview/overview.html">N
|
||||||
existing Android Studio installation and append the version number. This way,
|
Developer Preview</a>, follow the <a href=
|
||||||
when you install the new version, it will not override the existing one.</li>
|
"{@docRoot}preview/setup-sdk.html">setup instructions</a> for installing
|
||||||
<li>Download the appropriate ZIP file for your operating system from the
|
the latest version of Android Studio.
|
||||||
<a href="http://tools.android.com/download/studio/canary/latest"
|
</p>
|
||||||
>canary channel download page</a>.
|
|
||||||
</li>
|
|
||||||
<li>Unzip the package and move the Android Studio 2.1 contents to the
|
|
||||||
appropriate location for applications on your system, then launch it.</li>
|
|
||||||
<li>Open the Settings dialog
|
|
||||||
(<strong>File > Settings</strong> on Windows/Linux, or
|
|
||||||
<strong>Android Studio > Preferences</strong> on Mac). In the left
|
|
||||||
panel, select <strong>Appearance & Behavior > System Settings >
|
|
||||||
Updates</strong>.
|
|
||||||
</li>
|
|
||||||
<li>On the Updates panel, select the <strong>Automatically
|
|
||||||
check updates for</strong> check box and select
|
|
||||||
<strong>Canary Channel</strong> from the drop-down list.
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>Keep this settings window open for the next step.</p>
|
<p>
|
||||||
|
2. Use the <a href="{@docRoot}tools/help/sdk-manager.html">SDK
|
||||||
|
manager</a> to install or confirm that you have the latest installations
|
||||||
|
of the following packages:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Under the <strong>SDK Platforms tab</strong>:
|
||||||
|
<ul>
|
||||||
|
<li>Android N Preview
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
<h2 id="get-sdk">Get the Wear Preview SDK</h2>
|
<li>Under the <strong>SDK Tools tab</strong>:
|
||||||
|
<ul>
|
||||||
|
<li>Android Support Library
|
||||||
|
</li>
|
||||||
|
|
||||||
<p>To start developing with Wear Preview APIs, you need to install the
|
<li>Google Play services
|
||||||
Wear Preview SDK in Android Studio as follows:</p>
|
</li>
|
||||||
|
|
||||||
<ol>
|
<li>Google Repository
|
||||||
<li>While still viewing the Updates panel (step 4 from above),
|
</li>
|
||||||
select the <strong>Automatically
|
|
||||||
check updates for Android SDK</strong> check box and select
|
|
||||||
<strong>Preview Channel</strong> from the drop-down list.
|
|
||||||
</li>
|
|
||||||
<li>Click <strong>Check Now</strong>.</li>
|
|
||||||
|
|
||||||
<li>In the left panel, select <strong>Appearance & Behavior >
|
<li>Android Support Repository
|
||||||
System Settings > Android SDK</strong>.
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<li>Click the <strong>SDK Platforms</strong> tab, then select the
|
<h2 id="get_the_preview_reference_documentation">
|
||||||
<strong>Wear Preview</strong> check box.</li>
|
Get the Preview Reference Documentation
|
||||||
|
</h2>
|
||||||
|
|
||||||
<li>Click the <strong>SDK Tools</strong> tab, then select the
|
<p>
|
||||||
<strong>Android SDK Build Tools</strong>, <strong>Android SDK
|
Detailed information about the preview is available in the preview
|
||||||
Platform-Tools</strong>, and <strong>Android SDK Tools</strong> check
|
reference documentation, which you can download from the following table.
|
||||||
boxes.
|
The zip file includes an updated API reference for the preview.
|
||||||
</li>
|
</p>
|
||||||
|
|
||||||
<li>Click <strong>OK</strong>, then accept the licensing
|
<table>
|
||||||
agreements for any packages that need to be installed.
|
<tr>
|
||||||
</li>
|
<th scope="col">
|
||||||
</ol>
|
Reference documentation
|
||||||
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
Notes
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
[zip file name]
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<h2 id="create-update">Update or Create a Project</h2>
|
<h2 id="update_or_create_a_project">
|
||||||
|
Update or Create a Project
|
||||||
|
</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
To use the Wear Preview APIs, your project must be configured appropriately.
|
To use the APIs, your project must be configured appropriately in Android
|
||||||
</p>
|
Studio.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3 id="update_an_existing_project">
|
||||||
|
Update an existing project
|
||||||
|
</h3>
|
||||||
|
|
||||||
<h3 id="update">Update an existing project</h3>
|
<p>
|
||||||
|
To update an existing project for development:
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>Open the
|
<ol>
|
||||||
<code>build.gradle</code> file for your module and update the values as
|
<li>Start Android Studio, click <strong>Open an existing Android Studio
|
||||||
follows:
|
Project</strong>, and select a project.
|
||||||
</p>
|
</li>
|
||||||
|
|
||||||
<pre>
|
<li>If prompted by the Android SDK Manager for the SDK version to use for
|
||||||
android {
|
the project, select <strong>Use</strong> <strong>Android Studio's
|
||||||
compileSdkVersion <strong>'23'</strong>
|
SDK</strong>. <//li>
|
||||||
buildToolsVersion <strong>'24.0.1-rc1'</strong>
|
</li>
|
||||||
...
|
|
||||||
|
|
||||||
defaultConfig {
|
<li>If prompted to update the Gradle plugin, update the version of the
|
||||||
minSdkVersion <strong>'23'</strong>
|
plugin.
|
||||||
targetSdkVersion <strong>'23'</strong>
|
</li>
|
||||||
...
|
|
||||||
}
|
|
||||||
...
|
|
||||||
}</pre>
|
|
||||||
|
|
||||||
|
<li>In the <code>build.gradle</code> file for the Wear module, in the
|
||||||
|
<code>dependencies</code> section, update the existing reference to the
|
||||||
|
Wearable Support Library (for example, <code>compile
|
||||||
|
'com.google.android.support:wearable:1.4.0'</code>) by changing it to the
|
||||||
|
following, which requires that your the Google Repository <a href=
|
||||||
|
"#install_android_studio_and_the_latest_packages">is the latest
|
||||||
|
version</a>::
|
||||||
|
|
||||||
<h3 id="create">Create a new project</h3>
|
<pre>
|
||||||
|
compile 'com.google.android.support:wearable:2.0.0-alpha1'
|
||||||
|
|
||||||
<p>To create a new project for development with the Wear Preview SDK:</p>
|
</pre>
|
||||||
|
</li>
|
||||||
|
|
||||||
<ol>
|
<li>See the following page for setting up a watch or emulator with a
|
||||||
<li>Click <strong>File > New Project</strong>. and follow the steps until
|
preview system image, in order to begin testing your app: <a href=
|
||||||
you reach the Target Android Devices page.
|
"{@docRoot}wear/preview/downloads.html">Download and Test with a
|
||||||
</li>
|
Device</a>
|
||||||
<li>On this page, select <strong>Wear</strong> option.</li>
|
</li>
|
||||||
<li>Under <strong>Wear</strong> option, in the <strong>Minimum
|
</ol>
|
||||||
SDK</strong> option list, select
|
|
||||||
<strong>API 23: Android API 6.0 (Wear Preview)</strong>.</li>
|
<h3 id="create_a_new_project">
|
||||||
</ol>
|
Create a new project
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
To create a new project for development:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
<li>Click <strong>File > New Project</strong> and follow the steps in
|
||||||
|
the Create New Project wizard until you reach the Target Android Devices
|
||||||
|
page.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Optionally, select the <strong>Phone and Tablet</strong> option. If
|
||||||
|
you plan to use N Preview APIs in a phone app, then the Minimum SDK
|
||||||
|
option list, select <strong>API N: Android 6.x (N Preview)</strong>.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Select the <strong>Wear</strong> option, and in the Minimum SDK
|
||||||
|
option list, select the latest available (<strong>N Preview</strong>)
|
||||||
|
option. Click <strong>Next</strong> until you exit the Create New Project
|
||||||
|
wizard.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>In the <code>build.gradle</code> file for the Wear module, in the
|
||||||
|
<code>dependencies</code> section, update the existing reference to the
|
||||||
|
Wearable Support Library (perhaps <code>compile
|
||||||
|
'com.google.android.support:wearable:1.4.0'</code>) to:
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
compile 'com.google.android.support:wearable:2.0.0-alpha1'
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>See the following page for setting up a watch or emulator with a
|
||||||
|
preview system image, in order to begin testing your app: <a href=
|
||||||
|
"{@docRoot}wear/preview/downloads.html">Download and Test with a
|
||||||
|
Device</a>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|||||||
Reference in New Issue
Block a user