Thank you for the reply, Jon. I've managed to work around the problem by eliminating the class completely (I made a generic class that wraps an ICursor instead of implementing it myself) but I'm curious to know, if I did increase the level on my Library project, would I still be able to deploy to level 4? On Jul 20, 2012 1:58 PM, "Jonathan Pryor" <j...@xamarin.com> wrote:
> On Jul 19, 2012, at 9:32 PM, DFX wrote: > > When I change the Application to use a target API level of 12, 14, or > 15, I get a build error in the Application project. The error is: > > Cursor is not abstract and does not override abstract method > getType(int) in android.database.Cursor. > > Is Cursor located in your Application project or your Library project? > > The problem is that Java and C# don't fully match up semantically; in this > case, Java allows interfaces to change over time, while C# requires that > they never change. Guess what ICursor.GetType(int) is? > > > http://androidapi.xamarin.com/?link=M%3aAndroid.Database.ICursor.GetType(System.Int32) > > It's a method added to API 11. ICursor is in API 1. :-) > > So, Java is (rightfully!) complaining that your TargetFrameworkVersion is > Android 3.1 (API 12), which has a Cursor.getType() interface method, but > your Cursor implementation doesn't implement the ICursor.GetType() method. > > The fix? Implement that method. > > I suspect that your Cursor implementation is in your Library project, > which is set for a TargetFrameworkVersion <= API 10, so it doesn't "see" > ICursor.GetType(int). Consequently the IL doesn't implement > ICursor.GetType(int), and thus when your Application generates Android > Callable Wrappers there is no Cursor.GetType() method to generate. > > The fix? Ensure that your Library project targets the same > TargetFrameworkVersion as your Application project. > > - Jon > > _______________________________________________ > Monodroid mailing list > Monodroid@lists.ximian.com > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid >
_______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid