does not implement interface member 'IComparable.CompareTo(Object)'

Viewed 2276

I have an .aar file of android. I am trying to use it in my xamarin.android app. I followed the steps from the given in the link https://developer.xamarin.com/guides/android/advanced_topics/binding-a-java-library/binding-an-aar/

but when I am trying to build my library I am getting following error

"does not implement interface member 'IComparable.CompareTo(Object)'"

I found some solution for it where it is mentioned that in metadata.xml we need to add some attribute. so I added the following line there

path="/api/package[@name='com.logicjunction.ljindoorandroidsdk']/class[@name='FloorPlanBeaconsMapping']/implements[@name='java.lang.Comparable']" 

name="type">java.lang.Comparable>

But still getting same error. How I can fix this?

2 Answers

So I had the same problem which I could solve it by helping the compiler in adding those lines in Metada.xml (Transforms folder) :

<add-node path="/api/package[@name='<JAVA_PACKAGE_NAME>']/class[@name='<CLASS_NAME>']">
    <method name="compareTo" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public">
        <parameter name="p0" type="java.lang.Object" />
    </method>
</add-node>
Related