无法设置 googletv-video-player 应用程序
我下载了 googletv-video-player 示例 我正在尝试在我的本地系统上设置它。但我不能。
我还下载了 Google 电视视频播放器示例中所需的 LeftNavBar Library 。我添加了 leftnavbar 库项目,如下图所示:
但是当我尝试运行应用程序,我收到错误。 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库的JAR文件,但它也会导致错误: 我知道它抱怨缺少 LeftNavBarService 但它实际上存在......并且在编译时不会向我显示任何错误。
谢谢。
I downloaded the googletv-video-player example and am trying to set it up on my local system. But i am unable to.
I also downloaded the LeftNavBar Library which is needed in google tv video player example. I added the leftnavbar library project int it as shown in the following image:
But when i try to run the application, i get errors. LogCat is a follows:
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
I have also tried the JAR file of LeftNavBar Library but it also causes errors:
I know it complains about missing LeftNavBarService but its actually there ... and does not show me any errors while compiling.
thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该在 Eclipse 中将 LeftNavBar 库添加为库(项目 > 属性 > Android)
You should add LeftNavBar library in Eclipse as a Library ( Project > Properties >Android)