On stack overflow I answered some questions (e.g. http://stackoverflow.com/questions/38706366/interface-implement-differences-in-c-sharp-vs-java/38707255#38707255 ) where not inheriting from Java.Lang.Object
was the cause of the problem. The main problem is, that nobody sees the message on the build output.
Type 'MyListener ' implements Android.Runtime.IJavaObject but does not inherit from Java.Lang.Object. It is not supported.
Usually the interface is implemented with Handle and Dispose like:
public class SomeImplementation : ISomeJavaInterface
{
public IntPtr Handle
{
get
{
throw new NotImplementedException();
}
}
public void Dispose()
{
throw new NotImplementedException();
}
// ...
}
I've added a Stackoverflow documentation for it: http://stackoverflow.com/documentation/xamarin.android/771/bindings/18058/implementing-java-interfaces
I'm wondering if there is any reason for not failing early with a compiler error!? If not, this should be changed