Can't create handler inside thread that has not called Looper.prepare() 異常問題
Posted on 2011-07-30 10:04 oathleo 閱讀(4259) 評論(1) 編輯 收藏 所屬分類: Android遇到的情況
AsyncTask
protected GAViewer doInBackground(Activity... params) {
......
產生
原因估計
1.viewer 是個 SurfaceView ,而doInBackground是不允許操作UI的
2.drawActivity.getApplicationContext() 已經操作了UI ?maybe
......
GAViewer viewer = new GAViewer(result, drawActivity.getApplicationContext());
return viewer;
}return viewer;
產生
Can't create handler inside thread that has not called Looper.prepare()
異常原因估計
1.viewer 是個 SurfaceView ,而doInBackground是不允許操作UI的
2.drawActivity.getApplicationContext() 已經操作了UI ?maybe