简体   繁体   中英

GameCircle - MonoDroid - Xamarin

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!!

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM