Webview显示错误“未找到类”android.webkit.RenderProcessGoneDetail“

解决方案参考:
https://stackoverflow.com/questions/47524032/webview-shows-error-didnt-find-class-android-webkit-renderprocessgonedetail

7.0之后的Android出现问题,自定义WebViewClient可去除此异常

private class MyWebViewClient extends WebViewClient{
        @Override
        public void onPageStarted(WebView view, String url, Bitmap favicon) {
            // TODO Auto-generated method stub
            super.onPageStarted(view, url, favicon);
        }

        @SuppressWarnings("deprecation")
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            final Uri uri = Uri.parse(url);
            return true;
        }

        @TargetApi(Build.VERSION_CODES.N)
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
            view.loadUrl(request.getUrl().toString());
            return true;
        }
    }

你可能感兴趣的:(Webview显示错误“未找到类”android.webkit.RenderProcessGoneDetail“)