java.lang.IllegalStateException

tip

This probably occurs because you are calling notifyItemInserted(position);, notifyItemChanged(position), or notifyItemRemoved(position); from a background thread (or from a callback, which runs on a background thread). Use a Handler to solve it.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • crash report
    via GitHub by door43app
    ,
  • crash report
    via GitHub by door43app
    ,
  • Single selection in RecyclerView
    via Stack Overflow by Gunaseelan
    ,
    • java.lang.IllegalStateException at android.support.v7.widget.RecyclerView.assertNotInLayoutOrScroll(RecyclerView.java:2463) at android.support.v7.widget.RecyclerView$RecyclerViewDataObserver.onChanged(RecyclerView.java:4785) at android.support.v7.widget.RecyclerView$AdapterDataObservable.notifyChanged(RecyclerView.java:10769) at android.support.v7.widget.RecyclerView$Adapter.notifyDataSetChanged(RecyclerView.java:6347) at io.intercom.android.sdk.inbox.InboxFragment.onStateChange(InboxFragment.java:339) at io.intercom.android.sdk.inbox.InboxFragment.onStateChange(InboxFragment.java:54) at io.intercom.android.sdk.utilities.ChangeSubscriber.onStateChange(ChangeSubscriber.java:33) at io.intercom.android.sdk.store.Store$1.dispatch(Store.java:49) at io.intercom.android.sdk.store.Store$2.dispatch(Store.java:63) at io.intercom.android.sdk.middleware.PingMiddleware.dispatch(PingMiddleware.java:20) at io.intercom.android.sdk.store.Store$3.dispatch(Store.java:71) at io.intercom.android.sdk.middleware.LoggerMiddleware.dispatch(LoggerMiddleware.java:17) at io.intercom.android.sdk.store.Store$3.dispatch(Store.java:71) at io.intercom.android.sdk.store.Store.dispatch(Store.java:78) at io.intercom.android.sdk.inbox.InboxFragment.onLoadMore(InboxFragment.java:284) at io.intercom.android.sdk.views.EndlessRecyclerScrollListener.onScrolled(EndlessRecyclerScrollListener.java:36) at android.support.v7.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:4389) at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:4634) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) at android.view.Choreographer.doCallbacks(Choreographer.java:580) at android.view.Choreographer.doFrame(Choreographer.java:549) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)

    Users with the same issue

    filpgame
    2 times, last one,
    Diogo Jaym
    13 times, last one,
    Hiren Amaliyar
    2 times, last one,
    Indri Yunita
    1 times, last one,
    Aria Pahlavan
    7 times, last one,
    3 more bugmates