https://bugzilla.novell.com/show_bug.cgi?id=633376
https://bugzilla.novell.com/show_bug.cgi?id=633376#c0 Summary: Unable to get Invoker for abstract type 'Android.Widget.AdapterView`1 Classification: Mono Product: MonoDroid Version: SVN Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Class Libraries AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Repro: [Run code, touch item] using Android.Widget; using Android.OS; namespace MonoDroidApplication7 { public class Activity1 : Activity { ListView lv; public Activity1(IntPtr handle) : base(handle) { } protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); string[] items = new string[] { "Cat", "Dog", "Elephant" }; ArrayAdapter<string> adapter = new ArrayAdapter<string>(this, Android.R.Layout.Simple_list_item_1, items); lv = new ListView(this); lv.Adapter = adapter; lv.ItemClick += new AdapterView.OnItemClickEventHandler(lv_ItemClick); SetContentView(lv); } void lv_ItemClick(AdapterView<object> parent, View view, int position, long id) { } } } Exception: E/AndroidRuntime( 513): FATAL EXCEPTION: main E/AndroidRuntime( 513): java.lang.IllegalArgumentException: System.ArgumentException: Unable to get Invoker for abstract type 'Android.Widget.AdapterView`1[[System.Object, mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. E/AndroidRuntime( 513): Parameter name: TResult E/AndroidRuntime( 513): at Android.Runtime.Extensions._JavaCast[AdapterView`1] (IJavaObject instance) [0x00000] in <filename unknown>:0 E/AndroidRuntime( 513): at Android.Runtime.JavaTypeConverter`1+JObjectConverter`1[Android.Widget.AdapterView`1[System.Object],Android.Widget.AdapterView`1[System.Object]].FromNative (IJavaObject obj) [0x00000] in <filename unknown>:0 E/AndroidRuntime( 513): at Android.Widget.AdapterView+IOnItemClickListenerAdapter.n_OnItemClick_Landroid_widget_AdapterView_Landroid_view_View_IJ (IntPtr jnienv, IntPtr native__this, IntPtr native_parent, IntPtr native_view, Int32 native_position, Int64 native_id) [0x00000] in <filename unknown>:0 E/AndroidRuntime( 513): at mono.android.widget.adapterview.IOnItemClickListenerAdapter.n_onItemClick(Native Method) E/AndroidRuntime( 513): at mono.android.widget.adapterview.IOnItemClickListenerAdapter.onItemClick(IOnItemClickListenerAdapter.java:9) E/AndroidRuntime( 513): at android.widget.AdapterView.performItemClick(AdapterView.java:284) E/AndroidRuntime( 513): at android.widget.ListView.performItemClick(ListView.java:3382) E/AndroidRuntime( 513): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1696) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
