java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.

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

Solutions on the web

via Stack Overflow by bailando bailando
, 1 year ago
The specified child already has a parent. You must call removeView() on the child's parent first.
via GitHub by EpariNigam
, 1 year ago
The specified child already has a parent. You must call removeView() on the child's parent first.
via Stack Overflow by casolorz
, 5 months ago
The specified child already has a parent. You must call removeView() on the childs parent first.
via Stack Overflow by user8109379
, 6 months ago
The specified child already has a parent. You must call removeView() on the child's parent first.
via GitHub by adroitandroid
, 1 year ago
The specified child already has a parent. You must call removeView() on the child's parent first.
via Stack Overflow by Zelmec
, 7 months ago
The specified child already has a parent. You must call removeView() on the child's parent first. So my question is: What am I doing wrong? Am I using data binding incorrectly? Is Kotlin just not playing well with data binding? Any help or feedback
java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
at android.view.ViewGroup.addViewInner(ViewGroup.java:3883)
at android.view.ViewGroup.addView(ViewGroup.java:3736)
at android.view.ViewGroup.addView(ViewGroup.java:3681)
at android.support.v7.widget.RecyclerView$5.addView(RecyclerView.java:638)
at android.support.v7.widget.ChildHelper.addView(ChildHelper.java:107)
at android.support.v7.widget.RecyclerView$LayoutManager.addViewInt(RecyclerView.java:7054)
at android.support.v7.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:7012)
at android.support.v7.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:7000)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1428)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1377)
at android.support.v7.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1193)
at android.support.v7.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java:1043)
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:5349)
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:908)

Users with the same issue

2 times, 1 year ago
6 times, 1 year ago
5 times, 1 year ago
Once, 1 year ago
14 times, 1 year ago

Write tip

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