On Nov 15, 2012, at 11:04 AM, Jonathan Chapman <[email protected]>
wrote:
> When I build my application with "Use Shared Runtime" turned off and have the
> following constructor for my IntentService
>
> public ServerInitiatedSyncService()
> : base("ServerInitiatedSyncService")
> {
> }
>
> The intent to my service fails with the following call stack:
>
> 11-15 10:54:37.455 E/AndroidRuntime(16760): java.lang.RuntimeException:
> Unable to instantiate service com.apexsi.apexware.ServerInitiatedSyncService:
> java.lang.InstantiationException: can't instantiate class
> com.apexsi.apexware.ServerInitiatedSyncService; no empty constructor
This is a linker bug:
https://bugzilla.xamarin.com/show_bug.cgi?id=8428
http://docs.xamarin.com/android/guides/advanced_topics/Limitations#Limited_Java_Generation_Support
A workaround is to provide a constructor that preserves the IntentService
default constructor:
private ServerInitiatedSyncService(string ignoreMe)
: base()
{
}
- Jon
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid