我是新的 android 开发人员,当我运行此代码时,我收到此错误“找不到源”。就在它到达 url.openStream() 任何想法如何解决这个问题?
try {
URL url = new URL("http://pollsdb.com/test.txt");
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String str;
while ((str = in.readLine()) != null) {
}
in.close();
} catch (MalformedURLException e) {
} catch (IOException e) {
}