webview.postUrl(url, EncodingUtils.getBytes(arg, "base64");
提示 EncodingUtils 过时了怎么办?
改成如下:
WebView webview = new WebView(this);
setContentView(webview);
String url = "http://www.example.com";
String postData = "username=" + URLEncoder.encode(my_username, "UTF-8") + "&password=" + URLEncoder.encode(my_password, "UTF-8");
webview.postUrl(url,postData.getBytes());
网友评论