我使用示例创建了一个简单的玻璃应用程序作为示例。该应用程序有一个Activity,可以创建卡片,将它们添加到CardScrollView并将内容设置为滚动视图。我创建了一个触发器,用作“ok glass”提示来启动活动。我确保使用Glass Development Kit Sneak Peek作为Android的版本。该应用程序编译并部署到Google Glass设备,但是当它运行时,我收到以下错误。此外,“ok glass”提示也不会显示。不确定需要哪个版本的固件,但Google Glass设备表明它当前位于XE10并且它是最新的。
12-03 12:36:02.125: E/dalvikvm(12040): Could not find class 'com.google.android.glass.app.Card', referenced from method com.android.graingerglass.CategoriesCardAdapter.<init>
12-03 12:36:02.125: E/dalvikvm(12040): Could not find class 'com.google.android.glass.app.Card', referenced from method com.android.graingerglass.CategoriesCardAdapter.getView
12-03 12:36:02.132: E/AndroidRuntime(12040): FATAL EXCEPTION: main
12-03 12:36:02.132: E/AndroidRuntime(12040): java.lang.NoClassDefFoundError: com.google.android.glass.app.Card
12-03 12:36:02.132: E/AndroidRuntime(12040): at com.android.graingerglass.CategoriesCardAdapter.<init>(CategoriesCardAdapter.java:27)
12-03 12:36:02.132: E/AndroidRuntime(12040): at com.android.graingerglass.CategoriesCardActivity$LoadCategories.onPostExecute(CategoriesCardActivity.java:45)
12-03 12:36:02.132: E/AndroidRuntime(12040): at com.android.graingerglass.CategoriesCardActivity$LoadCategories.onPostExecute(CategoriesCardActivity.java:1)
12-03 12:36:02.132: E/AndroidRuntime(12040): at android.os.AsyncTask.finish(AsyncTask.java:602)
12-03 12:36:02.132: E/AndroidRuntime(12040): at android.os.AsyncTask.access$600(AsyncTask.java:156)
12-03 12:36:02.132: E/AndroidRuntime(12040): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:615)
12-03 12:36:02.132: E/AndroidRuntime(12040): at android.os.Handler.dispatchMessage(Handler.java:99)
12-03 12:36:02.132: E/AndroidRuntime(12040): at android.os.Looper.loop(Looper.java:137)
12-03 12:36:02.132: E/AndroidRuntime(12040): at android.app.ActivityThread.main(ActivityThread.java:4424)
12-03 12:36:02.132: E/AndroidRuntime(12040): at java.lang.reflect.Method.invokeNative(Native Method)
12-03 12:36:02.132: E/AndroidRuntime(12040): at java.lang.reflect.Method.invoke(Method.java:511)
12-03 12:36:02.132: E/AndroidRuntime(12040): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
12-03 12:36:02.132: E/AndroidRuntime(12040): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
12-03 12:36:02.132: E/AndroidRuntime(12040): at dalvik.system.NativeStart.main(Native Method)
答案 0 :(得分:1)
XE10是你的问题。 GDK Sneak Peek需要XE11。
你需要让你的Glass OTA到XE11。