GDK Quick Start

Before you begin to use the GDK, you need intermediate or better knowledge in Android development.

This quick start gets your environment set up with the GDK and shows you how to install your first piece of Glassware. Check out the pattern guides for detailed information on how to build Glassware.

For Android experts

If you're comfortable with Android, here's all you need to know:

  1. Get the Android 4.4.2 (API 19) SDK and Glass Development Kit Preview add-on from the Android SDK Manager.
  2. On Glass, turn on USB debugging (Settings > Device Info > Turn on debug).
  3. Import some GDK samples with the File > New Project > Android Sample Project menu.
  4. When you're ready to create a project for your own Glassware, use these settings:
    • Minimum and Target SDK Versions: 19 (There is only one Glass version, so minimum and target SDK are the same.)
    • Compile with: Glass Development Kit Developer Preview
    • Theme: None (ADT and Android Studio usually assign a theme automatically, even if you specify no theme, so remove the android:theme property from your manifest after creating a project.)
  5. Head on over to the pattern guides and developer guides for more learning.

For Android beginners

We recommend starting with the Building Your First App training class at the Android developers site and then building a few simple Android apps before building GDK Glassware.

Setting up the development environment

  1. We recommend installing the ADT Bundle for easier development. The rest of these steps assume you have this installed.
  2. Click Window > Android SDK Manager.
  3. Install the SDK Platform and Glass Development Kit Preview for Android 4.4.2 (API 19). Everything else is optional.
  4. On Glass, go to Settings > Device Info > Turn on debug to enable adb, which allows your development system to communicate with Glass.
  5. Connect Glass to your development system and confirm that it's detected by clicking Window > Open Perspective > DDMS and verifying Glass appears in the Devices tab.

Installing the samples

To see the source of and install a simple piece of Glassware, import one of the bundled GDK samples into Eclipse:

  1. Click File > New Project > Android Sample Project
  2. Select Glass Development Kit as the build target and click Next.
  3. Select the Compass, Stopwatch, or Timer sample and click Finish.
  4. In the Eclipse Package Explorer, right click the sample and select Run as > Android Application with Glass connected to your development system.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.