마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

이오류가 무슨뜻이죠?ㅠ

0 추천
The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. Make sure your adapter calls notifyDataSetChanged() when its content changes. [in ListView(2131493007, class android.widget.ListView) with Adapter(class android.widget.HeaderViewListAdapter)

 

저는 Fragment에서 html파싱을 하고 있습니다.

근데 동작하다가 자꾸 앱이 죽습니다.

일단 각 fragment에서 html파싱을 하는데

Async Task를 이용해서 파싱을 합니다

그리고 각각의 플라그먼트에 프로그레스바가 되어 있습니다.

그래서 Async Task에 작업하기전에 프로그레스바를 실행하고

작업이 끝난후에

listview를 갱신하기 위해

Adapter.notifyDataSetChanged(); 와

프로그레스바.dismiss();

를 주고 있습니다.

이앱으 잘동작은 하지만 여러번 탭을 변경하면

앱이 강제로 종료 됩니다...

캐시가 쌓여서 그런건지 먼지는 모르겠네요...

오류내용을 봐도 모르겠습니다 ㅠㅠ
익명사용자 님이 2015년 12월 23일 질문

1개의 답변

0 추천
 
채택된 답변

The content of the adapter has changed but ListView did not receive a notification.

 

1. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread.

2. Make sure your adapter calls notifyDataSetChanged() when its content changes.

AsyncTask doBackground() 안에서 UI 관련 handling 하는 부분이 있는지 확인 해보세요.
잘 되는데 어떤 경우(데이터가 변경되었거나 아니거나)에 문제가 발생하는지 역시 확인 해보세요.

 

i hope this may help you.

 

익명사용자 님이 2015년 12월 23일 답변
...