page.title=Get Started with the Preview meta.keywords="wear-preview" page.tags="wear-preview" page.image=images/cards/card-n-sdk_2x.png @jd:body
If you want an environment for basic compatibility testing 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 Download and Test with a Device.
However, to develop apps for the Android Wear 2.0 Developer Preview, you need to make some updates to your development environment, as described below.
1. For compatibility with the N Developer Preview, follow the setup instructions for installing the latest version of Android Studio.
2. Use the SDK manager to install or confirm that you have the latest installations of the following packages:
Detailed information about the preview is available in the preview reference documentation, which you can download from the following table. The zip file includes an updated API reference for the preview.
Reference documentation | Checksums |
---|---|
wearable-support-preview-2-docs.zip | MD5: afb770c9c5c0431bbcbdde186f1eae06 SHA-1: 81d681e61cee01f222ea82e83297d23c4e55b8f3 |
To use the APIs, your project must be configured appropriately in Android Studio.
To update an existing project for development:
build.gradle
file for the Wear module:
android
section, update the
compileSdkVersion
to 24.
android
section, update the
targetSdkVersion
to 24.
dependencies
section, update
the existing reference to the
Wearable Support Library (for example, compile
'com.google.android.support:wearable:1.4.0'
) by changing it to the
following, which requires that your the Google Repository is the latest
version:
compile 'com.google.android.support:wearable:2.0.0-alpha2'
To create a new project for development:
build.gradle
file for the Wear module:
android
section, update the
compileSdkVersion
to 24.
android
section, update the
targetSdkVersion
to 24.
dependencies
section, update
the existing reference to the
Wearable Support Library (for example, compile
'com.google.android.support:wearable:1.4.0'
) by changing it to the
following, which requires that your the Google Repository is the latest
version:
compile 'com.google.android.support:wearable:2.0.0-alpha2'