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 GitHub by Ztiany
, 1 year ago
The specified child already has a parent. You must call removeView() on the child's parent first.
via GitHub by ctl1690
, 1 year ago
The specified child already has a parent. You must call removeView() on the child's parent first.
via Stack Overflow by Farid Raja
, 1 year ago
The specified child already has a parent. You must call removeView() on the child's parent first.
via Stack Overflow by breakout
, 1 year ago
The specified child already has a parent. You must call removeView() on the child's parent first.
via GitHub by quaap
, 7 months ago
The specified child already has a parent. You must call removeView() on the child's parent first.
via Stack Overflow by codedawg82
, 2 years ago
The specified child already has a parent. You must call removeView() on the child's parent first.
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:3936)
at android.view.ViewGroup.addView(ViewGroup.java:3786)
at android.view.ViewGroup.addView(ViewGroup.java:3758)
at view_inspector.probe.ViewInspectorInterceptor.insertScalpelLayout(ViewInspectorInterceptor.java:272)
at view_inspector.probe.ViewInspectorInterceptor.onMeasure(ViewInspectorInterceptor.java:166)
at com.ztiany.imageselector.view_inspector.ProbeProxy$android_widget_FrameLayout.onMeasure(ProbeProxy$android_widget_FrameLayout.java:20)
at android.view.View.measure(View.java:17547)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5535)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:722)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:613)
at com.ztiany.imageselector.view_inspector.ProbeProxy$android_widget_LinearLayout.invokeOnMeasure(ProbeProxy$android_widget_LinearLayout.java:27)
at view_inspector.probe.Interceptor.invokeOnMeasure(Interceptor.java:59)
at view_inspector.probe.Interceptor.onMeasure(Interceptor.java:51)
at view_inspector.probe.ViewInspectorInterceptor.onMeasure(ViewInspectorInterceptor.java:176)
at com.ztiany.imageselector.view_inspector.ProbeProxy$android_widget_LinearLayout.onMeasure(ProbeProxy$android_widget_LinearLayout.java:20)
at android.view.View.measure(View.java:17547)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5535)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:436)
at android.view.View.measure(View.java:17547)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2015)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1173)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1379)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1061)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5885)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
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:5254)
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:903)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
2 times, 10 months ago
6 times, 11 months ago
5 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
18 more bugmates

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