Home > 未分類 > AsyncTaskでOnly the original thread that created a view hierarchy can touch its views.

AsyncTaskでOnly the original thread that created a view hierarchy can touch its views.

メモです。

AsyncTaskで処理をしているのに、Only the original thread that created a view hierarchy can touch its views.が出る場合。

→doInBackgroundでUIを触ってませんか?onPreExecuteかonPastExecuteで対応しましょう。
この問題、doInBackbroundでは2回目のアクセスの時に落ちるので、発見しにくいです。

コメント:2

コメントフォーム
Remember personal info

トラックバック:0

このエントリーのトラックバックURL
http://codedesign.jp/blog/2011/09/24/asynctask%e3%81%a7only-the-original-thread-that-created-a-view-hierarchy-can-touch-its-views/trackback/
Listed below are links to weblogs that reference
AsyncTaskでOnly the original thread that created a view hierarchy can touch its views. from codedesign.jp

Home > 未分類 > AsyncTaskでOnly the original thread that created a view hierarchy can touch its views.

検索
フィード
メタ情報

Return to page top