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:
- Get the Android 4.4.2 (API 19) SDK and Glass Development Kit Preview add-on from the Android SDK Manager.
- On Glass, turn on USB debugging (Settings > Device Info > Turn on debug).
- Import some GDK samples with the File > New Project > Android Sample Project menu.
- 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:themeproperty from your manifest after creating a project.)
- Head on over to the pattern guides and developer guides for more learning.
For Android beginners
Setting up the development environment
- We recommend installing the ADT Bundle for easier development. The rest of these steps assume you have this installed.
- Click Window > Android SDK Manager.
- Install the SDK Platform and Glass Development Kit Preview for Android 4.4.2 (API 19). Everything else is optional.
- On Glass, go to Settings > Device Info > Turn on debug to enable
adb, which allows your development system to communicate with Glass.
- 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:
- Click File > New Project > Android Sample Project
- Select Glass Development Kit as the build target and click Next.
- Select the Compass, Stopwatch, or Timer sample and click Finish.
- In the Eclipse Package Explorer, right click the sample and select Run as > Android Application with Glass connected to your development system.