Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,
    Expert 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.

  2. ,
    via stackoverflow.com by Unknown author

    You can find the exact answer on the link.

Solutions on the web

via Stack Overflow by Nitish Srivastava
, 1 year ago
Cannot call this method while RecyclerView is computing a layout or scrolling
via github.com by Unknown author, 1 year ago
via GitHub by door43app
, 2 years ago
Cannot call this method while RecyclerView is computing a layout or scrolling
via GitHub by door43app
, 2 years ago
Cannot call this method while RecyclerView is computing a layout or scrolling
via Stack Overflow by Muharrem
, 10 months ago
Cannot call this method while RecyclerView is computing a layout or scrolling
via Stack Overflow by Ehsan
, 4 months ago
Cannot call this method while RecyclerView is computing a layout or scrolling android.support.v7.widget.RecyclerView{f4f8145 VFED..... .F....ID 0,32-736,1022 #7f070054 app:id/recyc}, adapter:app.ehsan.currencyapp.CurrencyAdapter@e9b409a, layout:android.support.v7.widget.LinearLayoutManager@6e59dcb, context:app.ehsan.currencyapp.MainActivity@7b7f00f
java.lang.IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling	at android.support.v7.widget.RecyclerView.assertNotInLayoutOrScroll(RecyclerView.java:2161)	at android.support.v7.widget.RecyclerView$RecyclerViewDataObserver.onChanged(RecyclerView.java:4249)	at android.support.v7.widget.RecyclerView$AdapterDataObservable.notifyChanged(RecyclerView.java:9924)	at android.support.v7.widget.RecyclerView$Adapter.notifyDataSetChanged(RecyclerView.java:5741)	at com.virginredapp.ui.custom.ParallaxRecyclerAdapter.addData(ParallaxRecyclerAdapter.java:201)	at com.virginredapp.ui.adapter.TreasureHuntFeedAdapter.addData(TreasureHuntFeedAdapter.java:94)	at com.virginredapp.ui.fragments.TreasureHuntDashboardFragment.hideLoadmoreView(TreasureHuntDashboardFragment.java:257)	at com.virginredapp.ui.fragments.TreasureHuntDashboardFragment.access$700(TreasureHuntDashboardFragment.java:86)	at com.virginredapp.ui.fragments.TreasureHuntDashboardFragment$2.onScrolled(TreasureHuntDashboardFragment.java:283)	at android.support.v7.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:3948)	at android.support.v7.widget.RecyclerView.dispatchLayoutStep3(RecyclerView.java:3102)	at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2914)	at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3277)	at android.view.View.layout(View.java:15047)	at android.view.ViewGroup.layout(ViewGroup.java:4676)	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)	at android.widget.FrameLayout.onLayout(FrameLayout.java:388)	at android.view.View.layout(View.java:15047)	at android.view.ViewGroup.layout(ViewGroup.java:4676)	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)	at android.widget.FrameLayout.onLayout(FrameLayout.java:388)	at android.view.View.layout(View.java:15047)	at android.view.ViewGroup.layout(ViewGroup.java:4676)	at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)	at android.view.View.layout(View.java:15047)	at android.view.ViewGroup.layout(ViewGroup.java:4676)	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)	at android.widget.FrameLayout.onLayout(FrameLayout.java:388)	at android.view.View.layout(View.java:15047)	at android.view.ViewGroup.layout(ViewGroup.java:4676)	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)	at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)	at android.view.View.layout(View.java:15047)	at android.view.ViewGroup.layout(ViewGroup.java:4676)	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)	at android.widget.FrameLayout.onLayout(FrameLayout.java:388)	at android.view.View.layout(View.java:15047)	at android.view.ViewGroup.layout(ViewGroup.java:4676)	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)	at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)	at android.view.View.layout(View.java:15047)	at android.view.ViewGroup.layout(ViewGroup.java:4676)	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)	at android.widget.FrameLayout.onLayout(FrameLayout.java:388)	at android.view.View.layout(View.java:15047)	at android.view.ViewGroup.layout(ViewGroup.java:4676)	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2189)	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1896)	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1103)	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6018)	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:799)	at android.view.Choreographer.doCallbacks(Choreographer.java:599)	at android.view.Choreographer.doFrame(Choreographer.java:559)	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:784)	at android.os.Handler.handleCallback(Handler.java:733)	at android.os.Handler.dispatchMessage(Handler.java:95)	at android.os.Looper.loop(Looper.java:157)	at android.app.ActivityThread.main(ActivityThread.java:5872)	at java.lang.reflect.Method.invokeNative(Native Method)	at java.lang.reflect.Method.invoke(Method.java:515)	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:674)	at dalvik.system.NativeStart.main(Native Method)