java.util.concurrent.TimeoutException: android.view.ThreadedRenderer.finalize() timed out after 10 s

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/a_Chaon/article/details/71908481

全部报错日志 :

E/AndroidRuntime: FATAL EXCEPTION: FinalizerWatchdogDaemon
                                                                            Process: com.cn.sixuekeji.xinyongfu, PID: 11054
                                                                            java.util.concurrent.TimeoutException: android.view.ThreadedRenderer.finalize() timed out after 10 seconds
                                                                                at android.view.ThreadedRenderer.nDeleteProxy(Native Method)
                                                                                at android.view.ThreadedRenderer.finalize(ThreadedRenderer.java:448)
                                                                                at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:206)
                                                                                at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:189)
                                                                                at java.lang.Thread.run(Thread.java:818)

自己找到的问题地址: http://stackoverflow.com/questions/27232275/java-util-concurrent-timeoutexception-android-view-threadedrenderer-finalize/

问题解决描述:


Since KitKat, I have issues with WebViews (freeze, crash)

I have resolved these issues deactivating hardware acceleration for webViews. It could work for you.

if (Build.VERSION.SDK_INT >= 19) // KITKAT
{
    webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}

看描述,说是webveiw的硬件加速一直在启用,所以会造成此类错误. 我在所有用到webview的代码中,都添加了如下代码:

if (Build.VERSION.SDK_INT >= 19) // KITKAT
{
    webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
展开阅读全文

没有更多推荐了,返回首页