Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Glass: GDK with Android Studio

I’m trying to use the new Google Glass Development kit with Android Studio. Unfortunately I'm not having much success.

I get the error: "Gradle: package com.google.android.glass.touchpad does not exist"

I've added uses-library to the manifest as follows:

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@android:style/Theme" >

    <uses-library
        android:name="com.google.android.glass"
        android:required="true" />


    <activity
        android:name="com.glass.test.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

Then I've added the gdk.jar to the libs directory. And I've added the following to the dependency section of my build.gradle.

dependencies {
    compile files('libs/gdk.jar')
}

Any help with this would be very appreciated.

like image 599
Smalesy Avatar asked Nov 20 '13 21:11

Smalesy


People also ask

Does Google Glass Run Android?

Glass Android OS Glass EE2 runs on Android Oreo 8.1 (API level 27), but it doesn't include Google Mobile Services (GMS) or Google Play services. This might impact your choice of Google APIs.

Is Google Glass still supported?

After February 25, 2020, this update removes the need and ability to use your Google account on Glass. It also removes Glass' connection to backend services.

Is there an app for Google Glass?

MyGlass Android app Google's Android app for Glass doesn't offer anything beyond the web app in terms of device management, but it does include two very important features: tethering and mirroring.

How do you set up Google Glass?

In the MyGlass app, touch the menu button at the top of the screen and select Device. Select your Glass from the list. Make sure the confirmation code on Glass and your Android device match. Confirm the Bluetooth pairing on your Android device.


2 Answers

Change the compileSdkVersion in your build.gradle file to refer directly to the GDK add-on:

android {
    compileSdkVersion "Google Inc.:Glass Development Kit Preview:19"
    buildToolsVersion "19.0.2"

    // other stuff...
}

(The buildToolsVersion can be newer than 19.0.2 if you have a higher version of the SDK installed, as long as it's at least 19.0.2.)

like image 136
Tony Allevato Avatar answered Sep 28 '22 19:09

Tony Allevato


Today is 1/10/2015, and from now on, the best option becomes:

Change the compileSdkVersion in your build.gradle file to refer directly to the GDK add-on:

android {
    compileSdkVersion "Google Inc.:Glass Development Kit Preview:19"
    buildToolsVersion "19.1.0"

    // other stuff...
}

You should install 19.1.0 build tools first.

like image 27
user2914091 Avatar answered Sep 28 '22 19:09

user2914091