Tabs IllegalArgumentException:原因短语can';不要是空的。仅出现在选项卡和模拟器选项卡中

Tabs IllegalArgumentException:原因短语can';不要是空的。仅出现在选项卡和模拟器选项卡中,tabs,android-emulator,illegalargumentexception,Tabs,Android Emulator,Illegalargumentexception,上述代码集的此异常崩溃仅适用于在设备中正常工作的选项卡和模拟器选项卡。还尝试在try-catch块内捕获,但未工作 webView.webViewClient = object : WebViewClientCompat() { override fun onReceivedError(view: WebView?, errorCode: Int, description: String?, failingUrl: String?) { i

上述代码集的此异常崩溃仅适用于在设备中正常工作的选项卡和模拟器选项卡。还尝试在try-catch块内捕获,但未工作

webView.webViewClient = object : WebViewClientCompat() {
            override fun onReceivedError(view: WebView?, errorCode: Int, description: String?, failingUrl: String?) {
                if (view!!.url.equals(failingUrl)) {
                    toast(getString(R.string.please_try_when_internet_available))
                    webView.clearHistory()
                    webView.loadDataWithBaseURL(null, sHtmlTemplate, "text/html", "utf-8", null)
                }
                super.onReceivedError(view, errorCode, description, failingUrl)
            }

            override fun onReceivedError(view: WebView, request: WebResourceRequest, error: WebResourceErrorCompat) {
                super.onReceivedError(view, request, error)
            }
        }