Posted on 2011-07-30 10:04
oathleo 閱讀(4258)
評論(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