gpt4 book ai didi

android - Android 版 YouTube 播放器在播放广告时崩溃

转载 作者:行者123 更新时间:2023-12-03 05:18:03 25 4
gpt4 key购买 nike

我们使用 Android Youtube API在应用程序中。最近我注意到,每次我尝试播放启用了广告的视频时,应用程序都会崩溃。

我可以使用他们的 sample applications 重现它.我尝试过 SimplePlayerFragment 和 SimplePlayerView 示例。当我尝试提示 http://www.youtube.com/watch?v=QudbrUcVPxk 时,两者都崩溃了视频(这只是一个例子,其他带广告的视频也失败了)。

这是 LogCat 输出:

10-26 19:10:49.074: E/AndroidRuntime(21637): FATAL EXCEPTION: main 10-26 19:10:49.074: E/AndroidRuntime(21637): java.lang.IllegalStateException: android.os.DeadObjectException 10-26 19:10:49.074: E/AndroidRuntime(21637): at com.google.android.apps.youtube.api.jar.a.eo.surfaceDestroyed(SourceFile:236) 10-26 19:10:49.074: E/AndroidRuntime(21637): at android.view.SurfaceView.updateWindow(SurfaceView.java:555) 10-26 19:10:49.074: E/AndroidRuntime(21637): at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:232) 10-26 19:10:49.074: E/AndroidRuntime(21637): at android.view.View.dispatchDetachedFromWindow(View.java:12156) 10-26 19:10:49.074: E/AndroidRuntime(21637): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2565) 10-26 19:10:49.074: E/AndroidRuntime(21637): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2565) 10-26 19:10:49.074: E/AndroidRuntime(21637): at android.view.ViewGroup.removeViewInternal(ViewGroup.java:3785) 10-26 19:10:49.074: E/AndroidRuntime(21637): at android.view.ViewGroup.removeViewInternal(ViewGroup.java:3758) 10-26 19:10:49.074: E/AndroidRuntime(21637): at android.view.ViewGroup.removeView(ViewGroup.java:3690) 10-26 19:10:49.074: E/AndroidRuntime(21637): at com.google.android.youtube.player.YouTubePlayerView$1.b(Unknown Source) 10-26 19:10:49.074: E/AndroidRuntime(21637): at com.google.android.youtube.player.internal.r.h(Unknown Source) 10-26 19:10:49.074: E/AndroidRuntime(21637): at com.google.android.youtube.player.internal.r$e.onServiceDisconnected(Unknown Source) 10-26 19:10:49.074: E/AndroidRuntime(21637): at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1111) 10-26 19:10:49.074: E/AndroidRuntime(21637): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1125) 10-26 19:10:49.074: E/AndroidRuntime(21637): at android.os.Handler.handleCallback(Handler.java:730) 10-26 19:10:49.074: E/AndroidRuntime(21637): at android.os.Handler.dispatchMessage(Handler.java:92) 10-26 19:10:49.074: E/AndroidRuntime(21637): at android.os.Looper.loop(Looper.java:137) 10-26 19:10:49.074: E/AndroidRuntime(21637): at android.app.ActivityThread.main(ActivityThread.java:5103) 10-26 19:10:49.074: E/AndroidRuntime(21637): at java.lang.reflect.Method.invokeNative(Native Method) 10-26 19:10:49.074: E/AndroidRuntime(21637): at java.lang.reflect.Method.invoke(Method.java:525) 10-26 19:10:49.074: E/AndroidRuntime(21637): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) 10-26 19:10:49.074: E/AndroidRuntime(21637): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 10-26 19:10:49.074: E/AndroidRuntime(21637): at dalvik.system.NativeStart.main(Native Method) 10-26 19:10:49.074: E/AndroidRuntime(21637): Caused by: android.os.DeadObjectException 10-26 19:10:49.074: E/AndroidRuntime(21637): at android.os.BinderProxy.transact(Native Method) 10-26 19:10:49.074: E/AndroidRuntime(21637): at com.google.android.apps.youtube.api.b.a.be.a(SourceFile:221) 10-26 19:10:49.074: E/AndroidRuntime(21637): at com.google.android.apps.youtube.api.jar.a.eo.surfaceDestroyed(SourceFile:233) 10-26 19:10:49.074: E/AndroidRuntime(21637): ... 22 more

如果有任何关于如何解决问题的想法,我将不胜感激。

更新:

感谢@septagon,找到了另一条相关的 LogCat 消息:

10-27 16:58:51.763: D/YouTubeAndroidPlayerAPI(25196): apps.youtube.core.client.DefaultAdStatsClient.a:485 Pinging __AWCl-JGAkAHIAQWpAn4krwpwE7A-4AIAqAMBmAQFqgSwAU_QADdeVEnDazwBrSnaYs3R1HBqy45Cu537TEJ3YTBlvSni0sRdoz7KdLcSM8GN-htn40LlHEa78Q0Wc-Hrk04QcefoGDWqXcyn7fC6U9J6CfOz_J6n509CB7hJfQX2xrj2YTLwO2_AeK-bj9k3KWULoKQv_ZBYw5PfzGYPi2xuSOmQuuFoYcr0atVp-oLKiFDMrNiGhAsjaCbg8jlG43cEZZZ-VSGq1f9Oz1b-XQKw4AQBiAXhiftBkgUGCAMQARgBkgUGCAQQBRgKkgUGCAQQARgBkgUGCAYQARgBkgUECAYYA5AGAaAGHNgGAoAHuaXfLA&sigh=PjCzMkHYDKo&cid=5Gi9PCMcr3WKhFJWqILtjrdq&template_id=213">http://pubads.g.doubleclick.net/pagead/adview?ai=Cr6PgkatsUt7LE8GpmgXc3oHwBbGx9t8DsZHlu3Kx0vmLARABIOP7kwNQ4vr5ivj___AWCl-JGAkAHIAQWpAn4krwpwE7A-4AIAqAMBmAQFqgSwAU_QADdeVEnDazwBrSnaYs3R1HBqy45Cu537TEJ3YTBlvSni0sRdoz7KdLcSM8GN-htn40LlHEa78Q0Wc-Hrk04QcefoGDWqXcyn7fC6U9J6CfOz_J6n509CB7hJfQX2xrj2YTLwO2_AeK-bj9k3KWULoKQv_ZBYw5PfzGYPi2xuSOmQuuFoYcr0atVp-oLKiFDMrNiGhAsjaCbg8jlG43cEZZZ-VSGq1f9Oz1b-XQKw4AQBiAXhiftBkgUGCAMQARgBkgUGCAQQBRgKkgUGCAQQARgBkgUGCAYQARgBkgUECAYYA5AGAaAGHNgGAoAHuaXfLA&sigh=PjCzMkHYDKo&cid=5Gi9PCMcr3WKhFJWqILtjrdq&template_id=213 10-27 16:58:51.763: D/AndroidRuntime(25196): Shutting down VM 10-27 16:58:51.763: W/dalvikvm(25196): threadid=1: thread exiting with uncaught exception (group=0x4158d700) 10-27 16:58:51.773: E/AndroidRuntime(25196): FATAL EXCEPTION: main 10-27 16:58:51.773: E/AndroidRuntime(25196): java.lang.NullPointerException 10-27 16:58:51.773: E/AndroidRuntime(25196): at com.google.android.apps.youtube.core.player.AdStatsMacros.a(SourceFile:185) 10-27 16:58:51.773: E/AndroidRuntime(25196): at com.google.android.apps.youtube.core.client.DefaultAdStatsClient.a(SourceFile:481) 10-27 16:58:51.773: E/AndroidRuntime(25196): at com.google.android.apps.youtube.core.client.DefaultAdStatsClient.a(SourceFile:467) 10-27 16:58:51.773: E/AndroidRuntime(25196): at com.google.android.apps.youtube.core.client.DefaultAdStatsClient.a(SourceFile:461) 10-27 16:58:51.773: E/AndroidRuntime(25196): at com.google.android.apps.youtube.core.client.DefaultAdStatsClient.h(SourceFile:320) 10-27 16:58:51.773: E/AndroidRuntime(25196): at com.google.android.apps.youtube.core.player.StatsTracker.g(SourceFile:409) 10-27 16:58:51.773: E/AndroidRuntime(25196): at com.google.android.apps.youtube.core.player.an.handleMessage(SourceFile:1615) 10-27 16:58:51.773: E/AndroidRuntime(25196): at android.os.Handler.dispatchMessage(Handler.java:95) 10-27 16:58:51.773: E/AndroidRuntime(25196): at android.os.Looper.loop(Looper.java:137) 10-27 16:58:51.773: E/AndroidRuntime(25196): at android.app.ActivityThread.main(ActivityThread.java:5103) 10-27 16:58:51.773: E/AndroidRuntime(25196): at java.lang.reflect.Method.invokeNative(Native Method) 10-27 16:58:51.773: E/AndroidRuntime(25196): at java.lang.reflect.Method.invoke(Method.java:525) 10-27 16:58:51.773: E/AndroidRuntime(25196): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) 10-27 16:58:51.773: E/AndroidRuntime(25196): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 10-27 16:58:51.773: E/AndroidRuntime(25196): at dalvik.system.NativeStart.main(Native Method)

最佳答案

关于android - Android 版 YouTube 播放器在播放广告时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19604684/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com