IllegalStateException: reasonPhrase can't be empty with Android WebView IllegalStateException: reasonPhrase can't be empty with Android WebView android android

IllegalStateException: reasonPhrase can't be empty with Android WebView


I also faced a similar issue whenI used Jetpack webkit,from androidx.webkit package.

Using WebViewClientCompat from androidx.webkit for creating webViewClient resulted in the above exception,but falling back to framework's WebViewClient worked.

webview.webViewClient = WebViewClient()