In this section, we set up a development environment for Wear development.
Prerequisites
- Your favorite operating system (Windows, macOS, or Linux)
- Determine whether you have the latest JRE installed on your operating system
- Install the latest version of JDK or Open JDK
- Install the latest version of Android Studio (at the time of writing this book, the latest version is 2.2.3 and any newer version should be fine)
Visit https://developer.android.com/studio/index.html to download the latest version of Android Studio. Google highly recommends using Android Studio for all Android application development, since Android Studio has tight with and useful Android APIs:
After the Android Studio installation, it's now time to download the necessary SDK in the SDK Platforms
tab in SDK Manager
. Install one complete version of Android; for the scope of this book, we will install Android 7.1.1 API level 25
:
After the successful installation of the SDK of Nougat 7.1.1 API level 25, under the SDK Tools
tab, make sure you have the components, as shown in the following screenshot:
Android Support Library
Google Play services
Google Repository
Android Support Repository
Google releases updates on IDE and SDK Tools frequently; keep your development environment up-to-date.
Note
Note: if you plan to make your application available in China, then you must use the special release version 7.8.87 of the Google Play services client library to handle communication between a phone and watch: https://developer.android.com/training/wearables/apps/creating-app-china.html
Visit the following link to check the Release Note
s
on SDK Tools
: https://developer.android.com/studio/releases/sdk-tools.html.
Updating your IDE from the stable channel is highly recommended. Updates for Android Studio are available on four different channels:
- Canary channel
- Dev channel
- Beta channel
- Stable channel
Canary channel: The Android Studio team works continuously to make Android Studio better. In this channel, every week there will be an update release, and it will include new functionality changes and improvements; you can check those changes in the release notes. But updates from this channel are not recommended for application production.
Dev Channel: On this channel, a happens after a complete round of internal testing from the Android Studio team.
Beta channel: On this channel, updates are based on stable Canary builds. Before publishing these builds to a stable channel, Google releases them in the beta channel to get developer feedback.
Stable Channel: Are the official stable releases of the Android Studio and will be available to download on Google's page http://developer.android.com/studio.
By default, Android Studio receives from a stable channel.