Bug 33911 - Xamarin.Forms "No Constructor" error, ListViewAdapter
Summary: Xamarin.Forms "No Constructor" error, ListViewAdapter
Status: VERIFIED DUPLICATE of bug 32462
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-09-12 21:36 UTC by Pete Schmitz
Modified: 2018-05-08 09:10 UTC (History)
12 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED DUPLICATE of bug 32462

Description Pete Schmitz 2015-09-12 21:36:13 UTC
Description:

While using Xamarin Forms/PCL, all list views on android cause a crash if the user attempts to scroll the list view immediately after they navigate from the page containing the list view (back button, popasync, etc).

Reproduction:

 - Make a Forms/PCL project
 - Make a navigation page
 - "Push" a new ContentPage from the navigation page that includes a populated list view
 - Hit the device's back button and then immediately attempt to scroll the list view
 - Encounter the "System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.Platform.Android.ListViewAdapter" exception

This is a huge issue for us, as we're having people lose data in the middle of doing a store's inventory. I imagine most other android form users may be experiencing this issue as well. 

Also, we've encountered similar "No Constructor" errors in other areas (ListViewRenderer, MapViewRenderer, WebViewRenderer). I'll report more on those when I have more than just a stack from our users.

Here's the full stack for ListViewAdapter:
[MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.Platform.Android.ListViewAdapter from native handle bedccdfc ---> System.MissingMethodException: No constructor found for Xamarin.Forms.Platform.Android.ListViewAdapter::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
[MonoDroid] Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.
[MonoDroid]   --- End of managed exception stack trace ---
[MonoDroid] java.lang.Error: Java callstack:
[MonoDroid] 	at md5530bd51e982e6e7b340b73e88efe666e.ListViewAdapter.n_getCount(Native Method)
[MonoDroid] 	at md5530bd51e982e6e7b340b73e88efe666e.ListViewAdapter.getCount(ListViewAdapter.java:49)
[MonoDroid] 	at android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:218)
[MonoDroid] 	at android.widget.AbsListView.obtainView(AbsListView.java:2347)
[MonoDroid] 	at android.widget.ListView.makeAndAddView(ListView.java:1864)
[MonoDroid] 	at android.widget.ListView.fillDown(ListView.java:698)
[MonoDroid] 	at android.widget.ListView.fillGap(ListView.java:662)
[MonoDroid] 	at android.widget.AbsListView.trackMotionScroll(AbsListView.java:4991)
[MonoDroid] 	at android.widget.AbsListView$FlingRunnable.run(AbsListView.java:4539)
[MonoDroid] 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
[MonoDroid] 	at android.view.Choreographer.doCallbacks(Choreographer.java:580)
[MonoDroid] 	at android.view.Choreographer.doFrame(Choreographer.java:549)
[MonoDroid] 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
[MonoDroid] 	at android.os.Handler.handleCallback(Handler.java:739)
[MonoDroid] 	at android.os.Handler.dispatchMessage(Handler.java:95)
[MonoDroid] 	at android.os.Looper.loop(Looper.java:135)
[MonoDroid] 	at android.app.ActivityThread.main(ActivityThread.java:5257)
[MonoDroid] 	at java.lang.reflect.Method.invoke(Native Method)
[MonoDroid] 	at java.lang.reflect.Method.invoke(Method.java:372)
[MonoDroid] 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
[MonoDroid] 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
[MonoDroid]   --- End of inner exception stack trace ---
[MonoDroid]   at Java.Interop.TypeManager.CreateProxy (System.Type type, IntPtr handle, JniHandleOwnership transfer) [0x00039] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/src/Java.Interop/TypeManager.cs:267 
[MonoDroid]   at Java.Interop.TypeManager.CreateInstance (IntPtr handle, JniHandleOwnership transfer, System.Type targetType) [0x001ea] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/src/Java.Interop/TypeManager.cs:249 
[MonoDroid]   --- End of inner exception stack trace ---
[MonoDroid] at Java.Interop.TypeManager.CreateInstance (intptr,Android.Runtime.JniHandleOwnership,System.Type) [0x0022b] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/src/Java.Interop/TypeManager.cs:255
[MonoDroid] at Java.Lang.Object.GetObject (intptr,Android.Runtime.JniHandleOwnership,System.Type) [0x000e5] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:373
[MonoDroid] at Java.Lang.Object._GetObject<Android.Widget.BaseAdapter> (intptr,Android.Runtime.JniHandleOwnership) <0x000d7>
[MonoDroid] at Java.Lang.Object.GetObject<Android.Widget.BaseAdapter> (intptr,Android.Runtime.JniHandleOwnership) <0x0006f>
[MonoDroid] at Java.Lang.Object.GetObject<Android.Widget.BaseAdapter> (intptr,intptr,Android.Runtime.JniHandleOwnership) <0x0008b>
[MonoDroid] at Android.Widget.BaseAdapter.n_GetCount (intptr,intptr) [0x00000] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.Widget.BaseAdapter.cs:529
[MonoDroid] at (wrapper dynamic-method) object.dfc0203e-a375-4e97-80b7-67068b6dfb2b (intptr,intptr) <IL 0x00011, 0x0004b>
Comment 1 Ashley Gazich [MSFT] 2015-09-14 14:41:09 UTC
Moving from Android to Forms product category.
Comment 2 Sebastian Brandes 2015-11-02 12:30:02 UTC
This seems to be a duplicate of Bug 32462.

I have reproduced the bug here: https://youtu.be/tkCFa8FCbKI

Here is the full output of my debug window: http://pastebin.com/SNfkHz0r
Comment 3 Arvinthakash 2016-01-21 12:00:51 UTC
In my case, I am adding a listview inside another listview, the binding of data takes place without any issues but when i try to scroll the list items, I am getting this exception

Unable to activate instance of type Xamarin.Forms.Platform.Android.ListViewAdapter from native handle 0xbf82c28c (key_handle 0x29208f0e).

And inner exception shows 

No constructor found for Xamarin.Forms.Platform.Android.ListViewAdapter::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership)

Is there a fix or any workaround for this issue?

Thanks
Comment 4 soumya 2016-01-25 02:59:23 UTC
Facing same issue. Its a simple Listview in my case. Any workaround?
Comment 5 Shane 2016-01-25 03:03:43 UTC
There's a fix in the related bug here
https://bugzilla.xamarin.com/show_bug.cgi?id=32462

That might work by creating a custom renderer with the default constructor.. The workaround is for a scrollview but it might work for the listview as well
Comment 6 Samantha Houts [MSFT] 2016-03-21 21:36:45 UTC
I am marking this bug as a duplicate of 32462, as the original reporter described a problem when there is a View in the Header/Footer of the ListView. If this does not describe the issue you are having, please let us know.

Thank you!

*** This bug has been marked as a duplicate of bug 32462 ***
Comment 7 Parmendra Kumar 2016-04-07 16:24:06 UTC
I have checked this issue with Xamarin.Forms 2.2.0-pre1 and its working fine.

Hence closing this issue.
Comment 8 arorasurbhi93 2017-08-01 11:41:47 UTC
I have a list view inside another list view, facing below mentioned errors:
 --Not able to scroll the childlistview.
 -- Without selecting any list item if I navigate between pages, no issue. But if I select any list view item whether its of parent list or child list and navigate to another page and comes back to same System.NotSupportedExceptions comes.
Message:
Unable to activate instance of type Xamarin.Forms.Platform.Android.ListViewAdapter from native handle 0xbfeebb0c (key_handle 0xa5fd038).

StackTarce :
  at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x0017d] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
  at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x000b9] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
  at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
  at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
  at Java.Lang.Object.GetObject[T] (System.IntPtr jnienv, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00006] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
  at Android.Widget.BaseAdapter.n_GetCount (System.IntPtr jnienv, System.IntPtr native__this) [0x00000] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
  at (wrapper dynamic-method) System.Object:9f32f3d8-c5b3-41d4-aeed-987f0762c936 (intptr,intptr)

InnerException:
System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.Platform.Android.ListViewAdapter from native handle 0xbfeebb0c (key_handle 0xa5fd038). ---> System.MissingMethodException: No constructor found for Xamarin.Forms.Platform.Android.ListViewAdapter::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
  at Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.
  at java.lang.Error: Java callstack:
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ListViewAdapter.n_getCount(Native Method)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ListViewAdapter.getCount(ListViewAdapter.java:44)
  at at android.widget.HeaderViewListAdapter.getCount(HeaderViewListAdapter.java:132)
  at at android.widget.AdapterView.setFocusable(AdapterView.java:707)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ListViewAdapter.n_getView(Native Method)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ListViewAdapter.getView(ListViewAdapter.java:100)
  at at android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:220)
  at at android.widget.AbsListView.obtainView(AbsListView.java:2346)
  at at android.widget.ListView.makeAndAddView(ListView.java:1875)
  at at android.widget.ListView.fillDown(ListView.java:702)
  at at android.widget.ListView.fillSpecific(ListView.java:1366)
  at at android.widget.ListView.layoutChildren(ListView.java:1662)
  at at android.widget.AbsListView.onLayout(AbsListView.java:2148)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:596)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ListViewRenderer.n_onLayout(Native Method)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ListViewRenderer.onLayout(ListViewRenderer.java:65)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:29)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.n_onLayout(Native Method)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.onLayout(VisualElementRenderer_1.java:58)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:29)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.n_onLayout(Native Method)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.onLayout(VisualElementRenderer_1.java:58)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:29)
  at at md5270abb39e60627f0f200893b490a1ade.NavigationPageRenderer.n_onLayout(Native Method)
  at at md5270abb39e60627f0f200893b490a1ade.NavigationPageRenderer.onLayout(NavigationPageRenderer.java:65)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:29)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.n_onLayout(Native Method)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.onLayout(PlatformRenderer.java:63)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
  at at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
  at at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
  at at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
  at at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
  at at android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
  at at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
  at at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:2678)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2171)
  at at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1931)
  at at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
  at at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
  at at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
  at at android.view.Choreographer.doCallbacks(Choreographer.java:670)
  at at android.view.Choreographer.doFrame(Choreographer.java:606)
  at at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
  at at android.os.Handler.handleCallback(Handler.java:739)
  at at android.os.Handler.dispatchMessage(Handler.java:95)
  at at android.os.Looper.loop(Looper.java:148)
  at at android.app.ActivityThread.main(ActivityThread.java:5417)
  at at java.lang.reflect.Method.invoke(Native Method)
  at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
  at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
  --- End of inner exception stack trace ---
  at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00054] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00111] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  --- End of inner exception stack trace ---
  at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x0017d] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x000b9] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  at Java.Lang.Object.GetObject[T] (System.IntPtr jnienv, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00006] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  at Android.Widget.BaseAdapter.n_GetCount (System.IntPtr jnienv, System.IntPtr native__this) [0x00000] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  at at (wrapper dynamic-method) System.Object:9f32f3d8-c5b3-41d4-aeed-987f0762c936 (intptr,intptr)


I am using Visual studio for Xamarin.
Xamarin.Forms Version 2.3.4.247
Comment 9 arorasurbhi93 2017-08-01 11:42:14 UTC
I have a list view inside another list view, facing below mentioned errors:
 --Not able to scroll the childlistview.
 -- Without selecting any list item if I navigate between pages, no issue. But if I select any list view item whether its of parent list or child list and navigate to another page and comes back to same System.NotSupportedExceptions comes.
Message:
Unable to activate instance of type Xamarin.Forms.Platform.Android.ListViewAdapter from native handle 0xbfeebb0c (key_handle 0xa5fd038).

StackTarce :
  at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x0017d] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
  at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x000b9] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
  at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
  at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
  at Java.Lang.Object.GetObject[T] (System.IntPtr jnienv, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00006] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
  at Android.Widget.BaseAdapter.n_GetCount (System.IntPtr jnienv, System.IntPtr native__this) [0x00000] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
  at (wrapper dynamic-method) System.Object:9f32f3d8-c5b3-41d4-aeed-987f0762c936 (intptr,intptr)

InnerException:
System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.Platform.Android.ListViewAdapter from native handle 0xbfeebb0c (key_handle 0xa5fd038). ---> System.MissingMethodException: No constructor found for Xamarin.Forms.Platform.Android.ListViewAdapter::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
  at Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.
  at java.lang.Error: Java callstack:
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ListViewAdapter.n_getCount(Native Method)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ListViewAdapter.getCount(ListViewAdapter.java:44)
  at at android.widget.HeaderViewListAdapter.getCount(HeaderViewListAdapter.java:132)
  at at android.widget.AdapterView.setFocusable(AdapterView.java:707)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ListViewAdapter.n_getView(Native Method)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ListViewAdapter.getView(ListViewAdapter.java:100)
  at at android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:220)
  at at android.widget.AbsListView.obtainView(AbsListView.java:2346)
  at at android.widget.ListView.makeAndAddView(ListView.java:1875)
  at at android.widget.ListView.fillDown(ListView.java:702)
  at at android.widget.ListView.fillSpecific(ListView.java:1366)
  at at android.widget.ListView.layoutChildren(ListView.java:1662)
  at at android.widget.AbsListView.onLayout(AbsListView.java:2148)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:596)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ListViewRenderer.n_onLayout(Native Method)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ListViewRenderer.onLayout(ListViewRenderer.java:65)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:29)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.n_onLayout(Native Method)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.onLayout(VisualElementRenderer_1.java:58)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:29)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.n_onLayout(Native Method)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.onLayout(VisualElementRenderer_1.java:58)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:29)
  at at md5270abb39e60627f0f200893b490a1ade.NavigationPageRenderer.n_onLayout(Native Method)
  at at md5270abb39e60627f0f200893b490a1ade.NavigationPageRenderer.onLayout(NavigationPageRenderer.java:65)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:29)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.n_onLayout(Native Method)
  at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.onLayout(PlatformRenderer.java:63)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
  at at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
  at at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
  at at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
  at at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
  at at android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
  at at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
  at at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:2678)
  at at android.view.View.layout(View.java:16630)
  at at android.view.ViewGroup.layout(ViewGroup.java:5437)
  at at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2171)
  at at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1931)
  at at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
  at at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
  at at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
  at at android.view.Choreographer.doCallbacks(Choreographer.java:670)
  at at android.view.Choreographer.doFrame(Choreographer.java:606)
  at at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
  at at android.os.Handler.handleCallback(Handler.java:739)
  at at android.os.Handler.dispatchMessage(Handler.java:95)
  at at android.os.Looper.loop(Looper.java:148)
  at at android.app.ActivityThread.main(ActivityThread.java:5417)
  at at java.lang.reflect.Method.invoke(Native Method)
  at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
  at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
  --- End of inner exception stack trace ---
  at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00054] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00111] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  --- End of inner exception stack trace ---
  at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x0017d] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x000b9] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  at Java.Lang.Object.GetObject[T] (System.IntPtr jnienv, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00006] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  at Android.Widget.BaseAdapter.n_GetCount (System.IntPtr jnienv, System.IntPtr native__this) [0x00000] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  at at (wrapper dynamic-method) System.Object:9f32f3d8-c5b3-41d4-aeed-987f0762c936 (intptr,intptr)


I am using Visual studio for Xamarin.
Xamarin.Forms Version 2.3.4.247
Comment 10 demis kefelegn 2018-05-08 09:10:24 UTC
for me adding the below contractor resolved the issue

 public class ListViewRenderer: Xamarin.Forms.Platform.Android.ListViewRenderer
    {
        public ListViewRenderer(Context context)
        { }

        public ScrollViewRenderer(IntPtr javaReference, JniHandleOwnership transfer)
        { }
    }