alexrainman / CarouselView

CarouselView control for Xamarin Forms
MIT License
436 stars 178 forks source link

[Android]Object reference not set to an instance of an object. #524

Closed paullosoares closed 3 years ago

paullosoares commented 5 years ago

I'm having problems on android, ios works normally

at CarouselView.FormsPlugin.Android.CarouselViewRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs1[TElement] e) [0x00132] in <892bb6a09e5d43ddbe9591d58bbf4c0e>:0 at Xamarin.Forms.Platform.Android.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000c3] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:228 at Xamarin.Forms.Platform.Android.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:127 at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:341 at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x000af] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:120 at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00139] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:268 at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:92 at Xamarin.Forms.Platform.Android.VisualElementRenderer1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:414 at Xamarin.Forms.Platform.Android.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000e0] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:231 at Xamarin.Forms.Platform.Android.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:127 at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:341 at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x000af] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:120 at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00139] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:268 at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:92 at Xamarin.Forms.Material.Android.MaterialFrameRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e) [0x00072] in D:\a\1\s\Xamarin.Forms.Material.Android\MaterialFrameRenderer.cs:130 at Xamarin.Forms.Material.Android.MaterialFrameRenderer.set_Element (Xamarin.Forms.Frame value) [0x00018] in D:\a\1\s\Xamarin.Forms.Material.Android\MaterialFrameRenderer.cs:67 at Xamarin.Forms.Material.Android.MaterialFrameRenderer.Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in D:\a\1\s\Xamarin.Forms.Material.Android\MaterialFrameRenderer.cs:259 at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:341 at Xamarin.Forms.Platform.Android.ViewCellRenderer.GetCellCore (Xamarin.Forms.Cell item, Android.Views.View convertView, Android.Views.ViewGroup parent, Android.Content.Context context) [0x0008f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Cells\ViewCellRenderer.cs:41 at Xamarin.Forms.Platform.Android.CellRenderer.GetCell (Xamarin.Forms.Cell item, Android.Views.View convertView, Android.Views.ViewGroup parent, Android.Content.Context context) [0x00075] in D:\a\1\s\Xamarin.Forms.Platform.Android\Cells\CellRenderer.cs:51 at Xamarin.Forms.Platform.Android.CellFactory.GetCell (Xamarin.Forms.Cell item, Android.Views.View convertView, Android.Views.ViewGroup parent, Android.Content.Context context, Xamarin.Forms.View view) [0x0001e] in D:\a\1\s\Xamarin.Forms.Platform.Android\Cells\CellFactory.cs:20 at Xamarin.Forms.Platform.Android.ListViewAdapter.GetView (System.Int32 position, Android.Views.View convertView, Android.Views.ViewGroup parent) [0x00200] in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\ListViewAdapter.cs:299 at Android.Widget.BaseAdapter.n_GetView_ILandroid_view_View_Landroid_viewViewGroup (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 position, System.IntPtr native_convertView, System.IntPtr native_parent) [0x0001a] in <44fafc2e0f1847ee827456a85a04372d>:0 at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.65(intptr,intptr,int,intptr,intptr)

alexrainman commented 5 years ago

Identifying the issue from the StackTrace is kind of difficult. Can you provide more info?

SaiSrinivas0208 commented 3 years ago

I'm also having the same issue with android I did a work around previously but now i forgot it

SaiSrinivas0208 commented 3 years ago

At the time of LoadApplication (new App ()); from mainactivity it is giving this error