28 Apr 2014, 04:56

IDE Imports Part 5 - Gradle GDK with Android Studio


IDE Imports Part 5 - Gradle GDK with Android Studio

This is the fifth of a series of posts discussing how to get Google Glass Mirror (Java) and GDK projects set up in various IDEs.

One of the most common questions that I get from people during workshops is how to get set up either the Mirror quick start, or the GDK project into Eclipse, Android Studio or IntelliJ.

This post will cover importing a Gradle GDK project into Android Studio.

0. Clone from GitHub

See previous post.

1. Create New Project

2. Set Android SDK to use GDK 19

3. Hit ‘Next’ a few times

Until the project is imported.

4. Import Module

Import the GDK project as a module, and it will automatically be placed in the correct spot, and the Gradle configuration handled correctly.

5. Delete the dummy project

No reason to keep it around now.

6. Add compileSdkVersion to build.gradle

The correct value is:

compileSdkVersion "Google Inc.:Glass Development Kit Preview:19"

7. Fix the AndroidManifest.xml

Need to have one Activity that is considered the launch Activity, otherwise IntelliJ won’t let you run.

8. Finished!

You’re all done!

comments powered by Disqus