初始页面加载,当按下youtube播放按钮时,附加的图像显示,然后页面崩溃 . 之后我回到了上一页 .
问题不一致,我没有得到问题的日志 .
任何人都可以帮忙......
这是我得到的日志
07-27 19:47:39.181 3007-3050 / com.app.tastetycoons.recipereel W / Adreno-GSL :: ioctl fd 35 code 0x400c0907(IOCTL_KGSL_DEVICE_WAITTIMESTAMP_CTXTID)失败:错误22参数无效
07-27 19:47:39.181 3007-3050 / com.app.tastetycoons.recipereel W / Adreno-EGL :: EGL_BAD_PARAMETER
07-27 19:47:39.181 3007-3050 / com.app.tastetycoons.recipereel E / chromium:[错误:gl_fence_egl.cc(63)]无法等待EGLSync . 错误:EGL_BAD_PARAMETER
07-27 19:47:39.181 3007-3050 / com.app.tastetycoons.recipereel A / chromium:[致命:gl_fence_egl.cc(65)]检查失败:g_ignore_egl_sync_failures .
07-27 19:47:39.381 882-1585 /? I / WindowState:WIN DEATH:Window {32180b4c u0 com.app.tastetycoons.recipereel / com.app.tastetycoons.recipereel.DetailsActivity}
07-27 19:47:39.385 882-895 /? I / WindowState:WIN DEATH:Window {31ed81af u0 com.app.tastetycoons.recipereel / com.app.tastetycoons.recipereel.PlayActivity}
07-27 19:47:39.591 882-1556 /? I / ActivityManager:进程com.app.tastetycoons.recipereel(pid 3007)已经死亡
07-27 19:47:39.596 882-1556 /? W / ActivityManager:强制删除ActivityRecord {2097b98d u0 com.app.tastetycoons.recipereel / .PlayActivity t3287}:app死了,没有保存状态
07-27 19:47:39.622 882-918 /? V / WindowManager:基于图层:添加窗口窗口{1bbfeaf0 u0启动com.app.tastetycoons.recipereel},共17页
我使用webview来启动这个播放器 . 代码如下
在onCreate--
wvVideo = (WebView)findViewById(R.id.wvVideo);
wvVideo.setWebChromeClient(new WebChromeClient()); wvVideo.getSettings().setPluginState(WebSettings.PluginState.ON);
wvVideo.getSettings().setPluginState(WebSettings.PluginState.ON_DEMAND); wvVideo.setWebViewClient(new WebViewClient());
WebSettings webSettings = wvVideo.getSettings(); webSettings.setJavaScriptEnabled(true); webSettings.setMediaPlaybackRequiresUserGesture(false); wvVideo.addJavascriptInterface(new WebAppInterface(this), "Android");
1 回答
试试这个,我猜你是在三星设备上运行它 . 我也有这个问题,并通过在shouldOverrideUrlLoading上的这一行修复了这个问题 . 不需要设置chromeclient else where.Also尝试在清单上启用android:hardwareAccelerated =“true” .