IComparable.CompareTo(Java.Lang.Object)': containing type does not implement interface 'IComparable'

radjaradja MTMember

Hi,
Please would you advise with the issue I am actually getting?

Error 1324 'ExactTarget.ETPushSdk.Data.Attribute.Java.Lang.IComparable.CompareTo(Java.Lang.Object)': containing type does not implement interface 'Java.Lang.IComparable' C:\Xamarin-ExactTarget-develop\src\ExactTarget.ETPushSdk.Droid\Additions\ExactTarget.ETPushSdk.Data.cs 7 13 ExactTarget.ETPushSdk.Droid

I tried mapping in Metadata but not sure if its correct of course because I cannot find any useful documentation.

java.lang.Comparable;android.content.ComponentName;

Error comes in here:

partial class Attribute
{
int Java.Lang.IComparable.CompareTo(Java.Lang.Object obj)
{
return CompareTo((ExactTarget.ETPushSdk.Data.Attribute)obj);
}

}

Thanks a lot

Tagged:

Answers

  • MihaMarkicMihaMarkic SI ✭✭✭✭

    Looks like you are not implementing Java.Lang.IComparable anywhere and somewhere it is required?
    i.e.
    public class Attribute : Java.Lang.IComparable

    But looking only at partial code is hard to say.

  • radjaradja MTMember

    Hi,
    Thanks a lot for answer!

    Class Attribute in java implements:

    public class Attribute implements Serializable, Comparable
    { ....

    If I build my xamarin project I am getting:

    Error 1324 'ExactTarget.ETPushSdk.Data.Attribute.Java.Lang.IComparable.CompareTo(Java.Lang.Object)': containing type does not implement interface 'Java.Lang.IComparable' C:\Xamarin-ExactTarget-develop\src\ExactTarget.ETPushSdk.Droid\Additions\ExactTarget.ETPushSdk.Data.cs 7 13 ExactTarget.ETPushSdk.Droid

    I tried to map it in Metadata.xml file:

    java.lang.Comparable<android.content.ComponentName>

    But still I am getting error :( and I am not obviously sure of the syntax of mapping above.

    Thx

  • radjaradja MTMember

    attr path="/api/package[@name='com.exacttarget.etpushsdk.data']/class[@name='Attribute']/implements[@name='java.lang.Comparable']"
    name="name">java.lang.Comparable<android.content.ComponentName>

Sign In or Register to comment.