我试图通过android studio在java上发送一个http请求,它给了我标题中的错误,基本上该程序捕获程序,任何人都可以帮助我
P.S我向用户提供了互联网访问权限
public class reader{
public static String get = null;
public static void run(){
try {
URL oracle = new URL("http://www.oracle.com/");
BufferedReader in = new BufferedReader(
new InputStreamReader(oracle.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
Log.d("Ron", inputLine);
get += inputLine;
}
in.close();
}catch(Exception e){
Log.d("Ron" , e.toString());
}
}