私はこの関数で IOException を持っています:
protected Boolean doInBackground(Object... params)
{
boolean result = false;
String path = (String) params[0];
table = (TableLayout) params[1];
XmlPullParser topScores = null;
Log.i("topTen","Entro en doInBsck "+path);
try {
Vector<NameValuePair> vars = new Vector<NameValuePair>();
vars.add(new BasicNameValuePair("figurename", "completo"));
String ind=path+URLEncodedUtils.format(vars, null);
URL xmlUrl=new URL(ind);
topScores = XmlPullParserFactory.newInstance().newPullParser();
topScores.setInput(xmlUrl.openStream(),null);
} catch (XmlPullParserException e) {
Log.i("topTen","Excepcion XML" );
Log.i("topTen",e.getLocalizedMessage());
topScores = null;
} catch(MalformedURLException e) {
Log.i("topTen","Excepcion URL" );
Log.i("topTen",e.getMessage());
topScores = null;
}
catch (IOException e) {
Log.i("topTen","Excepcion IO");
Log.i("topTen",e.getMessage());
topScores = null;
}
if(topScores != null) {
try {
processScores(topScores);
} catch (XmlPullParserException e) {
Log.e("DEBUG_TAG", "doInBackground() inside TopScoresDownloader : Pull Parser failure", e);
} catch (IOException e) {
Log.e("DEBUG_TAG", "doInBackground() inside TopScoresDonwloader : IO Exception parsing XML",e);
}
}
return result;
}
マニフェストに次の権限があります。
<user-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_ STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
ログで次のメッセージを読みました。
<Unable to resolve host "ptha.ii.uam.es": No address associated with hostname>
携帯のブラウザでURLを見ようとすると、裾につながります!
何が問題なのかわからない!