James Scott

3 minute read

This post is the beginning of a mini-series of developing for Android Wear. This post will focus on setting up your environment for initial development with Android Studio. As someone who loves tinkering with new things, I was very anxious to try out the new Android Wear SDK especially after I received my e-mail notification from Motorola about the Moto 360.

In This Part of The Series…

I will describe just the the steps of setting up your environment to develop Android Wear Apps.

Android Studio Setup

To start developing Android Wearable Apps, you need 1) Android Studio and 2) Gradle.

  1. Android Studio is Google’s new highly favored child of an IDE that builds on top of IntelliJ.
  2. Gradle is the new build system. Previously, Ant was used.

Android Studio As of this writing, Android Studio was only at v0.8.0. I’m installing it on Mac OS X Mavericks. Go to http://developer.android.com/sdk/installing/studio.html Pleasantly enough, you download a DMG file. Just drag it into your Applications folder and you’re good to go! Quick side note: From the beginning, Google is trying to make the whole experience of development easier. Of course, seasoned developers would overlook this difference. However, I really see this very small change beneficial to first time programmers  and / or youth. (Compared to using Eclipse which just comes in a zip file and you have fish for the Eclipse executable) Upon opening, there’s a notification saying to update. After going to the change log, http://tools.android.com/recent, it seems like a very important update. This update  (0.8.1) brings the Android L Preview, Support for Wear and TV, and many other things. Even though it prompts you that an update is available, you need to still go check for updates yourself. Update and restart…

Getting Started

Google has a nice little tutorial here: http://developer.android.com/training/wearables/apps/creating.html Found their lesson to be a little out of order. From here, start following the tutorial on the website. I’m just going to note some changes I experienced..

  • Instead of setting up an emulator and device, I created the project first.
  • Kudos to Google letting the developer know how many devices can be targeted by choosing a specified API Level
  • I used Phone and Tablet API Level 19.
    • Defaulted all the following screens.
  • After finishing, it took awhile but to build, but eventually everything came up. However, there were errors.
  • In the “Messages Gradle Sync” window, you can install the repo and sync project.
  • Upon following the instructions, still no luck. Finally, upon adding the repo as reported in http://stackoverflow.com/a/24442494, it works. Afterwards, do the following:
    1. Go to SDK Manager
    2. Install the missing tools / SDK Platforms for your API  Levels.
    3. My final list of installed packages is as follows. (assuming Target Handheld is API Level 19 and Target Wear is API 20)

Other Materials: http://developer.android.com/training/building-wearables.html In the next part of the series, we get things up and running!

comments powered by Disqus