[mono-android] Reflection - Cannot find default constructor

Jonathan Pryor jpryor at novell.com
Fri Mar 25 09:11:50 EDT 2011


On Mar 25, 2011, at 8:51 AM, Willem Meints wrote:
> The problem I'm experiencing is that the Newton JSON library cannot find a default constructor on a type I'm trying to deserialize.

The linker removed it. Use the [Android.Runtime.PreserveAttribute] to keep the member. See also:

	http://monotouch.net/Documentation/API_Design#PreserveAttribute

(Yes, that's from MonoTouch, but Mono for Android uses the same pattern.)

 - Jon



More information about the Monodroid mailing list