I am using youtube video player api for playing youtube video in my app, but I am getting the following deadobject exception error.
Here is the 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
I have followed this link for development.
Why is this error ??
use loadVideo(video_id) instead of cueVideo(video_id), this helps me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With