I have a java class
public class MyWebViewClient extends WebViewClient
{
private MyUIWebView webView;
@Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)
{
super.onReceivedError(view, errorCode, description, failingUrl);
}
This compiles well.to which I want to add SSL error handling too, so I add
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
handler.proceed();
}
But this produces compile error
build:
[javac] Compiling 1 source file to /Users/admin/Documents/Mine
[javac] /Users/admin/Documents/MyWebViewClient.java:62: cannot find symbol
[javac] symbol : class SslErrorHandler
[javac] public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
[javac]
I have includes in place fo开发者_如何学编程r this class
import android.net.Uri;
import android.webkit.HttpAuthHandler;
import android.webkit.MimeTypeMap;
import android.webkit.URLUtil;
import android.webkit.WebView;
import android.webkit.WebViewClient;
Any ideas ?
import android.webkit.SslErrorHandler;
import android.net.http.SslError;
Looks like those two classes are missing imports.
You should add ");" after last } There are en mistcake in example you use
精彩评论