1

I'm using Android Studio to build a Glass app, with my SDK Manager updated to GDK Preview API 19 Revision 9, and my device is on XE 21.3. I'm trying to use the new CardBuilder class, but it isn't available. I can still use the deprecated Card class, but the new stuff just won't show up.

I even uninstalled/reinstalled the Android 4.4.2 packages, but nothing. The same occurs when I load the project in Eclipse, too. I'd like to not use the Card class, as this is for a demo tutorial.

Got any tips on how to force this?

user2302078
  • 142
  • 1
  • 11
  • http://stackoverflow.com/questions/25736745/google-glass-gdk-backward-compatibility ? Guess you said your device is already on 21.3, but don't know if that will help you. – Scott Barta Oct 07 '14 at 23:32
  • Hi Scott - yeah, everything with my dev environment is current so it should be good to use the new class, but it doesn't show as available. Even Google's sample projects don't work. So it might be something with configuration, I'm guessing? – user2302078 Oct 07 '14 at 23:40
  • Can you share your gradle file? (build.gradle in your app folder) – pt2121 Oct 08 '14 at 01:16
  • See below, EntryLevelDev. :) (And thanks!) – user2302078 Oct 08 '14 at 22:30

4 Answers4

1

It took me several minutes before Android Studio was able to recognise the new class. You shall delete the build folder and start a clean compilation. There is a problem with classes already compiled with previous version of the GDK which are not noticed for recompilation.

fmmanrique
  • 26
  • 2
1

Mine finally got repaired...today's Android SDK update to 23.0.5 seemed to do the trick...that and playing with the External Libraries menu in the Project panel to make sure the new class was available and then manually adding the namespace. Whew.

Thanks for your help everybody! :)

user2302078
  • 142
  • 1
  • 11
0

I thought it might be that but it's the same as the Google SDK Sample Projects, but here's what I've got:

apply plugin: 'com.android.application'

repositories {
        jcenter()
    flatDir {
        dirs 'prebuilt-libs'
    }
}

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

    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 20
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
}
user2302078
  • 142
  • 1
  • 11
  • everything looks right. idk. maybe android studio points to a wrong sdk? i'm running out of idea here. – pt2121 Oct 09 '14 at 00:54
0

This is why I've stuck with Eclipse for Glass development. Android Studio has been too flaky again and again... I do use Android Studio for standard Android development