2013-10-31 76 views
5

我使用YouTube視頻播放器API在我的應用中播放YouTube視頻,但是我收到以下deadobject異常錯誤。deadobject播放YouTube視頻時的異常

這裏是logcat的

10-31 11:14:54.670: E/AndroidRuntime(13535): FATAL EXCEPTION: main 
10-31 11:14:54.670: E/AndroidRuntime(13535): java.lang.IllegalStateException: android.os.DeadObjectException 
10-31 11:14:54.670: E/AndroidRuntime(13535): at com.google.android.apps.youtube.api.jar.a.eo.surfaceDestroyed(SourceFile:236) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at android.view.SurfaceView.updateWindow(SurfaceView.java:564) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:235) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at android.view.View.dispatchDetachedFromWindow(View.java:12086) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2772) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2772) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at android.view.ViewGroup.removeViewInternal(ViewGroup.java:3891) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at android.view.ViewGroup.removeViewInternal(ViewGroup.java:3866) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at android.view.ViewGroup.removeView(ViewGroup.java:3798) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at com.google.android.youtube.player.YouTubePlayerView$1.b(Unknown Source) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at com.google.android.youtube.player.internal.r.h(Unknown Source) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at com.google.android.youtube.player.internal.r$e.onServiceDisconnected(Unknown Source) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1102) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1116) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at android.os.Handler.handleCallback(Handler.java:615) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at android.os.Handler.dispatchMessage(Handler.java:92) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at android.os.Looper.loop(Looper.java:137) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at android.app.ActivityThread.main(ActivityThread.java:4898) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at java.lang.reflect.Method.invokeNative(Native Method) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at java.lang.reflect.Method.invoke(Method.java:511) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at dalvik.system.NativeStart.main(Native Method) 
10-31 11:14:54.670: E/AndroidRuntime(13535): Caused by: android.os.DeadObjectException 
10-31 11:14:54.670: E/AndroidRuntime(13535): at android.os.BinderProxy.transact(Native Method) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at com.google.android.apps.youtube.api.b.a.be.a(SourceFile:221) 
10-31 11:14:54.670: E/AndroidRuntime(13535): at com.google.android.apps.youtube.api.jar.a.eo.surfaceDestroyed(SourceFile:233) 
10-31 11:14:54.670: E/AndroidRuntime(13535): ... 22 more 

我跟了這link發展。

爲什麼這個錯誤?

+0

我想這似乎是一個錯誤。請檢查:https://code.google.com/p/gdata-issues/issues/detail?id = 5431 –

+0

到現在爲止沒有提供修復程序? – Beginner

+0

我猜不行。您可以在該網站上發佈您的問題並對該問題發表評論。希望他們提出該決議。 –

回答

1

使用loadVideo(video_id)而不是cueVideo(video_id),這可以幫助我