2

I'm trying to use GameCircle SDK on Xamarin Mono for android, but I have these problems:

Com.Amazon.Ags.Client.Whispersync.GameDataSingleMap.cs(23,23): Error CS0738: 
`Com.Amazon.Ags.Client.Whispersync.GameDataSingleMap' does not implement interface member 
`Com.Amazon.Ags.Client.Whispersync.Model.IMergeable.DeepCopy()' 
and the best implementing candidate 
`Com.Amazon.Ags.Client.Whispersync.GameDataSingleMap.DeepCopy()' 
return type `Com.Amazon.Ags.Client.Whispersync.GameDataSingleMap' 
does not match interface member return type `Java.Lang.Object' (CS0738) (GameCircle.MonoDroid)


Com.Amazon.Ags.Client.Whispersync.GameDataSingleMap.cs(23,23): Error CS0535: 
`Com.Amazon.Ags.Client.Whispersync.GameDataSingleMap' does not implement interface member 
`Com.Amazon.Ags.Client.Whispersync.Model.IMergeable.Merge(Java.Lang.Object)' (CS0535) (GameCircle.MonoDroid)

Com.Amazon.Ags.Client.Whispersync.Model.NumberList.cs(80,80): Error CS0103: The name `DeepCopy' does not exist in the current context (CS0103) (GameCircle.MonoDroid)

I've created a repository on GitHub so anyone can contribute to make it work.

https://github.com/mapo80/GameCircle.MonoDroid

Any help?

Thanks!!

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Mapo
  • 115
  • 1
  • 11

1 Answers1

1

This is due to limitations in the bindings generator and Java covariant return types. The fix is to add a managedReturn attribute to Transforms\Metadata.xml.

Please see the Problem: Class does not implement interface method section within the Binding a Java Library (.jar) documentation.

For example, you would add this XML fragment to Transforms\Metadata.xml:

<attr
    path="/api/package[@name='com.amazon.ags.client.whispersync']/class[@name='GameDataSingleMap']/method[@name='deepCopy']"
    name="managedReturn"
>Java.Lang.Object</attr>
jonp
  • 13,512
  • 5
  • 45
  • 60