Этот код запускался на сотовом телефоне с Android 9, а на терминале Эвотор на строчке c.connect(); уходит сразу на Finally.
` @Override
protected void onPostExecute(String content) {
contentText = content;
}
private String getContent(String path) throws IOException {
BufferedReader reader = null;
try {
URL url = new URL(path);
HttpsURLConnection c = (HttpsURLConnection)url.openConnection();
c.setRequestMethod("GET");
c.setReadTimeout(10000);
c.connect();
reader = new BufferedReader(new InputStreamReader(c.getInputStream()));
StringBuilder buf = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
buf.append(line + "\n");
}
return(buf.toString());
}
finally {
if (reader != null) {
reader.close();
}
}
}`
Этот код запускался на сотовом телефоне с Android 9, а на терминале Эвотор на строчке c.connect(); уходит сразу на Finally. ` @Override protected void onPostExecute(String content) { contentText = content; }
Где может быть проблема?