Jon, That workaround works fine for me (IInputFilter) but if the RegisterType runs twice I get:
System.ArgumentException: An element with the same key already exists in the dictionary. at System.Collections.Generic.Dictionary`2<string, System.Type>.Add (string,System.Type) <0x00328> at Android.Runtime.TypeManager.RegisterType (string,System.Type) <0x00073> Is there a way of checking for existing registrations? Thanks, Andy -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Jonathan Pryor Sent: 06 December 2011 16:48 To: Discussions related to Mono for Android Subject: Re: [mono-android] Java.Lang.NoClassDefFoundError: java.lang.ICharSequence On Dec 6, 2011, at 8:13 AM, Tossing, Chris wrote: > I am able to launch and run our application, but I am getting a Java.Lang.NoClassDefFoundError exception when trying set the items of an AlertDialog using AlertDialog.Builder.SetItems(..). > > Here is our code: > var builder = this.CreateDialog(title, null) > .SetItems(items, (s, e) => { CallResultHandler(resultHandler, (int)e.Which); }) > .SetNeutralButton(defaultText ?? "Cancel", (s, e) => { CallResultHandler(resultHandler, null); }); That's a new one (I usually see that with IInputFilter). This should should be fixed in the next release. In the meantime, you should be able to fix this by placing the following statement prior to the above statement: Android.Runtime.TypeManager.RegisterType ("java/langCharSequence", typeof (Java.Lang.ICharSequence)); Thanks, - Jon _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
