Skip to content

Instantly share code, notes, and snippets.

@AkhileshKumar01
Created February 2, 2015 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AkhileshKumar01/7f5889e85c0e75d1313c to your computer and use it in GitHub Desktop.
Save AkhileshKumar01/7f5889e85c0e75d1313c to your computer and use it in GitHub Desktop.
Java.Lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
at at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <IL 0x00011, 0x00047>
at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue[]) [0x00084] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:896
at Android.Views.ViewGroup.AddView (Android.Views.View) [0x00070] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.Views.ViewGroup.cs:1968
at at Xamarin.Forms.Platform.Android.ScrollViewContainer.set_ChildView (Xamarin.Forms.View) <IL 0x00054, 0x00153>
at at Xamarin.Forms.Platform.Android.ScrollViewRenderer.LoadContent () <IL 0x00011, 0x0004f>
at at Xamarin.Forms.Platform.Android.ScrollViewRenderer.SetElement (Xamarin.Forms.VisualElement) <IL 0x000ab, 0x003db>
at at Xamarin.Forms.Platform.Android.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement) <IL 0x00022, 0x000ca>
at at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement,Xamarin.Forms.Platform.Android.IVisualElementRenderer,Xamarin.Forms.Platform.Android.RendererPool,bool) <IL 0x00024, 0x000f7>
at at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement,Xamarin.Forms.VisualElement) <IL 0x00114, 0x004db>
at at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () <IL 0x0000d, 0x00057>
at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.View>.SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager) <0x0005b>
at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.View>.SetElement (Xamarin.Forms.View) <0x005eb>
at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.View>.Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement) <0x0012f>
at at Xamarin.Forms.Platform.Android.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement) <IL 0x00022, 0x000ca>
at at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement,Xamarin.Forms.Platform.Android.IVisualElementRenderer,Xamarin.Forms.Platform.Android.RendererPool,bool) <IL 0x00024, 0x000f7>
at at Xamarin.Forms.Platform.Android.VisualElementPackager.OnChildAdded (object,Xamarin.Forms.ElementEventArgs) <IL 0x00014, 0x00093>
at at Xamarin.Forms.Element.OnChildAdded (Xamarin.Forms.Element) <IL 0x00037, 0x0011b>
at at Xamarin.Forms.Layout.OnInternalAdded (Xamarin.Forms.View) <IL 0x00002, 0x0002c>
at at Xamarin.Forms.Layout.InternalChildrenOnCollectionChanged (object,System.Collections.Specialized.NotifyCollectionChangedEventArgs) <IL 0x00094, 0x0043f>
at at System.Collections.ObjectModel.ObservableCollection`1<Xamarin.Forms.Element>.OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs) <0x00081>
at at System.Collections.ObjectModel.ObservableCollection`1<Xamarin.Forms.Element>.InsertItem (int,Xamarin.Forms.Element) <0x000ad>
at at System.Collections.ObjectModel.Collection`1<Xamarin.Forms.Element>.Add (Xamarin.Forms.Element) <0x0006d>
at at Xamarin.Forms.ContentView.set_Content (Xamarin.Forms.View) <IL 0x0004a, 0x0011f>
at ScrollviewBugTest.App/<App>c__AnonStorey0.<>m__0 (object,System.EventArgs) [0x00024] in /Users/xamarin23/Downloads/ScrollviewBugTest 2/ScrollviewBugTest/ScrollviewBugTest.cs:53
at at Xamarin.Forms.Button.Xamarin.Forms.IButtonController.SendClicked () <IL 0x00027, 0x000c2>
at at Xamarin.Forms.Platform.Android.ButtonRenderer/ButtonClickListener.OnClick (Android.Views.View) <IL 0x00015, 0x000a7>
at Android.Views.View/IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.Views.View.cs:1987
at at (wrapper dynamic-method) object.247fe460-ab0f-4c40-b6f5-b8f51e6840c3 (intptr,intptr,intptr) <IL 0x00017, 0x0001f>
at --- End of managed exception stack trace ---
at java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
at at android.view.ViewGroup.addViewInner(ViewGroup.java:3562)
at at android.view.ViewGroup.addView(ViewGroup.java:3415)
at at android.view.ViewGroup.addView(ViewGroup.java:3360)
at at android.view.ViewGroup.addView(ViewGroup.java:3336)
at at xamarin.forms.platform.android.ButtonRenderer_ButtonClickListener.n_onClick(Native Method)
at at xamarin.forms.platform.android.ButtonRenderer_ButtonClickListener.onClick(ButtonRenderer_ButtonClickListener.java:29)
at at android.view.View.performClick(View.java:4438)
at at android.view.View$PerformClick.run(View.java:18422)
at at android.os.Handler.handleCallback(Handler.java:733)
at at android.os.Handler.dispatchMessage(Handler.java:95)
at at android.os.Looper.loop(Looper.java:136)
at at android.app.ActivityThread.main(ActivityThread.java:5017)
at at java.lang.reflect.Method.invokeNative(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:515)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at at dalvik.system.NativeStart.main(Native Method)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment