5

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 ??

6
  • I guess this seems to be a bug. Check this : code.google.com/p/gdata-issues/issues/detail?id=5431 Commented Oct 31, 2013 at 5:51
  • till now no fixes are provided??? Commented Oct 31, 2013 at 6:01
  • I guess no.You can post your issue on that site and comment on that.Hope they come up with the resolution. Commented Oct 31, 2013 at 6:05
  • Thanks:). but i have a doubt. how are the other apps which are using youtube video player api and already in play store, how the video is playing in it. Commented Oct 31, 2013 at 6:11
  • I am not sure but there might be change in API or something like change of OS versions. Commented Oct 31, 2013 at 6:15

1 Answer 1

1

use loadVideo(video_id) instead of cueVideo(video_id), this helps me

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.