android RecyclerView IndexOutOfBoundsException错误

时间:2019-06-18 07:52:04

标签: android indexoutofboundsexception

RecyclerViewjava.lang.IndexOutOfBoundsException错误 但我不知道确切原因(很难复制) 错误消息如下

java.lang.IndexOutOfBoundsException: 
  at android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition (RecyclerView.java:5421)
  at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline (RecyclerView.java:5603)
  at android.support.v7.widget.GapWorker.prefetchPositionWithDeadline (GapWorker.java:285)
  at android.support.v7.widget.GapWorker.flushTaskWithDeadline (GapWorker.java:342)
  at android.support.v7.widget.GapWorker.flushTasksWithDeadline (GapWorker.java:358)
  at android.support.v7.widget.GapWorker.prefetch (GapWorker.java:365)
  at android.support.v7.widget.GapWorker.run (GapWorker.java:396)
  at android.os.Handler.handleCallback (Handler.java:873)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loop (Looper.java:214)
  at android.app.ActivityThread.main (ActivityThread.java:7045)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:964)

0 个答案:

没有答案