无法设置googletv-video-player应用程序

时间:2012-01-28 17:01:41

标签: android google-tv

我下载了 googletv-video-player example ,并尝试在我的本地系统上进行设置。但我无法做到。

我还下载了谷歌电视视频播放器示例中所需的LeftNavBar Library。我在其中添加了leftnavbar库项目,如下图所示:

enter image description here

但是当我尝试运行应用程序时,我会收到错误。 LogCat如下:

01-28 21:50:22.017: I/dalvikvm(1065): Could not find method com.example.google.tv.leftnavbar.LeftNavBarService.instance, referenced from method com.example.tv.videoplayer.Style1Activity.onCreate
01-28 21:50:22.017: W/dalvikvm(1065): VFY: unable to resolve static method 59: Lcom/example/google/tv/leftnavbar/LeftNavBarService;.instance ()Lcom/example/google/tv/leftnavbar/LeftNavBarService;
01-28 21:50:22.027: D/dalvikvm(1065): VFY: replacing opcode 0x71 at 0x0003
01-28 21:50:22.087: I/dalvikvm(1065): Could not find method com.example.google.tv.leftnavbar.LeftNavBar.setNavigationMode, referenced from method com.example.tv.videoplayer.Style1Activity.onDataComplete
01-28 21:50:22.087: W/dalvikvm(1065): VFY: unable to resolve virtual method 55: Lcom/example/google/tv/leftnavbar/LeftNavBar;.setNavigationMode (I)V
01-28 21:50:22.087: D/dalvikvm(1065): VFY: replacing opcode 0x6e at 0x0010
01-28 21:50:22.146: I/dalvikvm(1065): Could not find method com.example.google.tv.leftnavbar.LeftNavBar.newTab, referenced from method com.example.tv.videoplayer.Style1Activity.onDataComplete
01-28 21:50:22.146: W/dalvikvm(1065): VFY: unable to resolve virtual method 53: Lcom/example/google/tv/leftnavbar/LeftNavBar;.newTab ()Landroid/app/ActionBar$Tab;
01-28 21:50:22.146: D/dalvikvm(1065): VFY: replacing opcode 0x6e at 0x001a
01-28 21:50:22.420: D/AndroidRuntime(1065): Shutting down VM
01-28 21:50:22.420: W/dalvikvm(1065): threadid=1: thread exiting with uncaught exception (group=0x40014760)
01-28 21:50:22.477: E/AndroidRuntime(1065): FATAL EXCEPTION: main
01-28 21:50:22.477: E/AndroidRuntime(1065): java.lang.NoClassDefFoundError: com.example.google.tv.leftnavbar.LeftNavBarService
01-28 21:50:22.477: E/AndroidRuntime(1065):     at com.example.tv.videoplayer.Style1Activity.onCreate(Style1Activity.java:59)
01-28 21:50:22.477: E/AndroidRuntime(1065):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
01-28 21:50:22.477: E/AndroidRuntime(1065):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1712)
01-28 21:50:22.477: E/AndroidRuntime(1065):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1764)
01-28 21:50:22.477: E/AndroidRuntime(1065):     at android.app.ActivityThread.access$1500(ActivityThread.java:122)
01-28 21:50:22.477: E/AndroidRuntime(1065):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1002)
01-28 21:50:22.477: E/AndroidRuntime(1065):     at android.os.Handler.dispatchMessage(Handler.java:99)
01-28 21:50:22.477: E/AndroidRuntime(1065):     at android.os.Looper.loop(Looper.java:132)
01-28 21:50:22.477: E/AndroidRuntime(1065):     at android.app.ActivityThread.main(ActivityThread.java:4025)
01-28 21:50:22.477: E/AndroidRuntime(1065):     at java.lang.reflect.Method.invokeNative(Native Method)
01-28 21:50:22.477: E/AndroidRuntime(1065):     at java.lang.reflect.Method.invoke(Method.java:491)
01-28 21:50:22.477: E/AndroidRuntime(1065):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
01-28 21:50:22.477: E/AndroidRuntime(1065):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
01-28 21:50:22.477: E/AndroidRuntime(1065):     at dalvik.system.NativeStart.main(Native Method)
01-28 21:50:25.059: W/dalvikvm(1065): threadid=6: spin on suspend #1 threadid=9 (pcf=0)
01-28 21:50:25.667: D/dalvikvm(1065): Temporarily moving tid 1073 to fg (was 0)
01-28 21:50:25.667: D/dalvikvm(1065): Temporarily raised priority on tid 1073 (10 -> 0)
01-28 21:50:25.686: W/dalvikvm(1065): threadid=6: spin on suspend resolved in 1687 msec
01-28 21:50:25.686: D/dalvikvm(1065): Restored policy of 1073 to 0
01-28 21:50:25.686: D/dalvikvm(1065): Restored priority on 1073 to 10
01-28 21:50:25.897: D/DataActivity(1065): start of doInBackground
01-28 21:50:26.932: D/DataActivity(1065): Finished - all is well
01-28 21:52:01.486: I/Process(1065): Sending signal. PID: 1065 SIG: 9

我还尝试过LeftNavBar Library的JAR文件,但它也会导致错误: 我知道它抱怨缺少 LeftNavBarService ,但它实际上存在......并且在编译时没有显示任何错误。

感谢。

1 个答案:

答案 0 :(得分:1)

您应该将Eclipse中的LeftNavBar库添加为库(项目>属性> Android)enter image description here

相关问题