此代码在 2.2 模拟器 (API 8) 中运行良好,但在 4.1 模拟器 (API 16) 中无法运行。任何想法?
感谢您的所有回答和兴趣
`try
{
String url = "http://10.0.2.2:8080/cofradeapps/static/hermandades.xml";
urlHermandades = new URL(url);
HttpURLConnection urlConnection = (HttpURLConnection) urlHermandades.openConnection();
InputStream in = urlConnection.getInputStream();
return in;
}
catch (IOException e)
{
throw new RuntimeException(e);
}