728x90

해당 에러로그

Fatal Exception: java.lang.IllegalStateException: 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(2131296938, class android.widget.ListView) with Adapter (~)

 

 

Fatal Exception: java.lang.IllegalStateException: 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(2131296938, class android.widget.ListView) with Adapter()
       at android.widget.ListView.layoutChildren(ListView.java:1715)
       at android.widget.AbsListView.onTouchUp(AbsListView.java:4129)
       at android.widget.HwAbsListView.onTouchUp(HwAbsListView.java:535)
       at android.widget.AbsListView.onTouchEvent(AbsListView.java:3909)
       at android.view.View.dispatchTouchEvent(View.java:11788)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2647)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
       at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:549)
       at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1953)
       at android.app.Activity.dispatchTouchEvent(Activity.java:3559)
       at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:502)
       at android.view.View.dispatchPointerEvent(View.java:12027)
       at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5278)
       at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5067)
       at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4581)
       at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4634)
       at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4600)
       at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4727)
       at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4608)
       at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4784)
       at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4581)
       at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4634)
       at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4600)
       at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4608)
       at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4581)
       at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7169)
       at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7143)
       at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7104)
       at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7325)
       at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:192)
       at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
       at android.os.MessageQueue.next(MessageQueue.java:379)
       at android.os.Looper.loop(Looper.java:144)
       at android.app.ActivityThread.main(ActivityThread.java:7529)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)

 

 

상황원인: 디바이스 성능이 낮은 경우에 잘 발생하는 에러로, adapter의 콘텐츠를 UI 쓰레드로 처리해야하는데, 백그라운드에서 하려고 했기 때문에 발생하는 에러. 디바이스 성능이 좋으면 잘 나타나지 않는다고 함. (케바케인 것)

해결방법 : UI 쓰레드로 처리하도록 코드를 수정하면 되는데, 로그를 찍는 포인트가 어정쩡한지 대체 어느 부분인가...

 

 


Reference

https://devuryu.tistory.com/132

https://tigerwoods.tistory.com/26

 

 

 

 

 

 

728x90

+ Recent posts