private class GetXMLTask extends AsyncTask<String, Void, String>
{
@Override
protected String doInBackground(String... urls)
{
String output = null;
try
{
List<String> citations = new ArrayList<String>();
for (String url : urls)
{
output = getOutputFromUrl(url);
citations.add(output);
outputText.setText(output);
}
}
catch(Exception e)
{
Toast.makeText(getBaseContext(), "Cant connect to server", Toast.LENGTH_LONG).show();
}
return output;
}
}
//我正在尝试从 Google App Engine 读取字符串并将其设置为文本框。其余的代码都很好。但是异步任务抛出了一个致命的异常......帮助!