4
votes

I configure eclipse ADT for glass development successfully.
Then I create a sample project and try to develop google glass card or timelineitem.

when I compile and run, an error occurred from android tuntime

java.lang.NoClassDefFoundError: com.google.android.glass.app.Card

this error also occurring for

com.google.android.glass.timeline.TimelineManager   

Error Log enter image description here How can I solve it?

2
If you go to your project's properties dialog in Eclipse and click on the Android section, which SDK is checked? - Tony Allevato
glass development kit sneak peek, api level 15 - Moddasir
What version of the software is your Glass device running? - Tony Allevato
Glass Software Version is XE11 - Moddasir
can you give us a screenshot ? What IDE? Eclipse? What other projects do you have open in that workspace ? - fabrizioM

2 Answers

2
votes

You have to set your project to compile with the Glass GDK.

Make sure you're targeting 15, have the GDK downloaded as per the other answer, and then:

Select your project on the left side of the screen, open project poperties (alt-enter, or right click -> properties), go to Android tab, scroll down to Android 4.0.3, and in that section will be the Glass Development Kit Sneak Peak. Check the box next to this, hit ok and everything should start working.

EDIT:

Just to make sure, your manifest should have this line:

    <uses-sdk
    android:minSdkVersion="15"
    android:targetSdkVersion="15" />
0
votes

Make sure you are targeting API 15 and that you installed the glass development Kit. See the Picture:

enter image description here