HttpsURLConnection httpsURLConnection=(HttpsURLConnection)url.openConnection();
第24行是这样的:
公共类BackGroundWork扩展了AsyncTask]
我附加的图像是错误列表中的错误。
答案 0 :(得分:0)
try this codes below:
URL url = new URL(Link);
URLConnection connect = url.openConnection();
@Override
protected Object doInBackground(Object[] objects) {
try {
String data = URLEncoder.encode("tableName", "UTF8") + "=" + URLEncoder.encode(TableName, "UTF8") + "&" + "record" + "=" + RecordNo;
//data
URL url = new URL(Link);
URLConnection connect = url.openConnection();
connect.setDoOutput(true);
OutputStreamWriter wr = new OutputStreamWriter(connect.getOutputStream());
wr.write(data);
wr.flush();
String S = convetInputStreamToString(connect.getInputStream());
assert S != null;
if (!S.equals("no")) {
GetUpdates.access = true;
GetUpdates.res = S;
} else {
GetUpdates.access = false;
GetUpdates.err = S;
}
} catch (IOException e) {
e.printStackTrace();
}
return "";
}