java.lang.IllegalStateException: caused by targetIndex == -1

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

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by stay4cold
, 1 year ago
caused by targetIndex == -1
java.lang.IllegalStateException: caused by targetIndex == -1
at com.heaven7.android.dragflowlayout.DragFlowLayout$InternalItemHelper.onRemoveView(DragFlowLayout.java:616)
at com.heaven7.android.dragflowlayout.DragFlowLayout.removeView(DragFlowLayout.java:470)
at com.heaven7.android.dragflowlayout.DefaultDragCallback.removeFromParent(DefaultDragCallback.java:79)
at com.heaven7.android.dragflowlayout.DefaultDragCallback.onRemoveView(DefaultDragCallback.java:72)
at com.heaven7.android.dragflowlayout.DragFlowLayout$InternalItemHelper.dispatchViewRemove(DragFlowLayout.java:585)
at com.heaven7.android.dragflowlayout.DragFlowLayout$InternalItemHelper.onRemoveView(DragFlowLayout.java:628)
at com.heaven7.android.dragflowlayout.DragFlowLayout.removeView(DragFlowLayout.java:470)
at com.heaven7.android.dragflowlayout.DragFlowLayout.processOverlap(DragFlowLayout.java:371)
at com.heaven7.android.dragflowlayout.DragFlowLayout.access$200(DragFlowLayout.java:29)
at com.heaven7.android.dragflowlayout.DragFlowLayout$2.onMove(DragFlowLayout.java:89)
at com.heaven7.android.dragflowlayout.AlertWindowHelper$DragTouchListener.onTouch(AlertWindowHelper.java:131)
at android.view.View.dispatchTouchEvent(View.java:8657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2517)
at com.heaven7.android.dragflowlayout.DragFlowLayout.onTouchEvent(DragFlowLayout.java:504)
at android.view.View.dispatchTouchEvent(View.java:8668)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2517)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2175)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2175)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2175)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2175)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2175)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2175)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2175)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2514)
at android.view.View.dispatchPointerEvent(View.java:8874)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4729)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4587)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4086)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4139)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4105)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4242)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4113)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.