我的AsyncTask类中有以下代码:
protected void onPostExecute(Integer result)
{
if (result == 1)
{
try {
Global.mmOutStream.write(99);
} catch (IOException e) { }
Intent intentTrashcanLocation = new Intent(TrashcanLocationActivity.this, TrashcanLocationActivity.class);
startActivity(intentTrashcanLocation);
}
}
这在“
Intent
”行给了我错误:行断点:
TrashcanOnWayActiity$waitarrival [line:53] - onPostExecute(Integer)
作用域中无法访问类型为
TrashcanLocationActivity
的封闭实例我要做的基本上是每当我异步获得某些输入时就显示下一页。我无法解决这个问题。任何帮助将不胜感激!
最佳答案
您正在使用同一班
Intent intentTrashcanLocation = new Intent(TrashcanLocationActivity.this,
TrashcanLocationActivity.class);
startActivity(intentTrashcanLocation);
应该是一些东西
Intent intentTrashcanLocation = new Intent(TrashcanLocationActivity.this,
TrashcandetailActivity.class);
startActivity(intentTrashcanLocation);