Posted on 2011-07-30 10:04
oathleo 阅读(4251)
评论(1) 编辑 收藏 所属分类:
Android
遇到的情况
AsyncTask
protected GAViewer doInBackground(Activity... params) {
......
GAViewer viewer = new GAViewer(result, drawActivity.getApplicationContext());
return viewer;
}
产生
Can't create handler inside thread that has not called Looper.prepare()
异常
原因估计
1.viewer 是个 SurfaceView ,而doInBackground是不允许操作UI的
2.drawActivity.getApplicationContext() 已经操作了UI ?maybe