Question

I'm getting errors related to an issue with my app having been compiled on an earlier version. In Android Studio I was using 'compileSdkVersion "Google Inc.:Glass Development Kit Sneak Peek:15"' in my build.gradle but after trying to send an app to my device I'm getting:

    4277-4277/com.myapp.app E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.myapp.app, PID: 4277
java.lang.NoClassDefFoundError: com.google.android.glass.timeline.TimelineManager
Was it helpful?

Solution

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

OTHER TIPS

As the release notes say, TimelineManager has been removed. After you change your compileSdkVersion as kurtisnelson pointed out, you'll need to revise your code to create LiveCards directly

I was trying to get this to work in IntelliJ IDEA, and what I ended up doing is going into project structure (+;) and changing the Build target under SDKs to Glass Development Kit Preview (4.4.2):

Project structure screenshot

Note: Make sure build.gradle still has the proper compileSdkVersion value:

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

Upgrade Android Studio to 0.5.5 and set the string to "Google Inc.:Glass Development Kit Preview:19".

There was an issue with IDE not picking up the right JDK even though gradle used the correct version. Google pushed an update earlier today.

Update the Glass Development Kit Preview using the Android SDK Manager. Under Android Platform 4.4.2 you can select it.

Try running a example of this new versión and compare it with your code.

I was also using Android Studio and had terrible luck getting a previously functional Glass app to compile on XE16. I had changed the build.gradle to exactly what kurtisnelson answered here without luck. Android Studio acts like it doesn't see the SDK update.

[edit: Android Studio just got an update to 0.5.5 which fixed this issue]

I ended up switching to the Android Development Tools (ADT) bundle running on Eclipse, and things went smoothly. http://developer.android.com/sdk/installing/bundle.html

Side note: if you're using voice commands, don't forget to add this to your manifest file:

<uses-permission android:name="com.google.android.glass.permission.DEVELOPMENT" />

If your voice command isn't on the pre-approved list of words, you have to add this Development permission to your app. See here for more details: https://developers.google.com/glass/distribute/voice-checklist

To make Gradle happy, you'll need to upgrade a few things, and then modify the build.gradle file located in your app's module.

  1. Upgrade Android Studio to at 0.5.5. You can either use the built in "Check for updates" feature or download it directly.
  2. Open your Android SDK Manager and install the latest version of GDK. It will be under a new folder, 4.4.2, with the title Glass Development Kit Preview.
  3. Open your existing GDK project and edit the inner build.gradle file found in your app's module. For imported projects this would be <project root>/app/build.gradle
  4. Change your compileSdkVersion to 19. It will result in a file that looks something like this:

    apply plugin: 'android'
    
    android {
        compileSdkVersion 19
        buildToolsVersion "19.0.3"
    
        defaultConfig {
            minSdkVersion 19
            targetSdkVersion 19
        }
    ...
    }
    
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top