我有一个通用指南,可能在某些领域有所帮助:
https://gist.github.com/JonDouglas/dda6d8ace7d071b0e8cb
我认为您目前的情况可以通过以下方式解决:
理想情况下,您需要将managedType
更改为Java.Lang.Object
。
<!-- There are also some methods that need to have their generic _parameter_ types simplified to `java.lang.Object`.
Possible error message: Error CS0115: `SomeMethod(..., T, ...)' is marked as an override but no suitable method found to override (CS0115)
Possible error message: Error CS0535: `SomeClass' does not implement interface member `SomeMethod(..., Java.Lang.Object,...)' (CS0535)
Possible error message: Error CS0534: `SomeClass' does not implement inherited abstract member `SomeMethod(..., Java.Lang.Object,...)' (CS0534) -->
<attr path="/api/package[@name='com.socialize.api']/class[@name='SocializeApi.AsyncAuthenicator']/method[@name='doInBackground' and count(parameter)=1 and parameter[1][@type='com.socialize.api.SocializeRequest']]/parameter[1]" name="managedType">Java.Lang.Object</attr>
<attr path="/api/package[@name='com.socialize.api']/class[@name='SocializeApi.AsyncGetter']/method[@name='doInBackground' and count(parameter)=1 and parameter[1][@type='com.socialize.api.SocializeRequest']]/parameter[1]" name="managedType">Java.Lang.Object</attr>
<attr path="/api/package[@name='com.socialize.api']/class[@name='SocializeApi.AsyncPutter']/method[@name='doInBackground' and count(parameter)=1 and parameter[1][@type='com.socialize.api.SocializeRequest']]/parameter[1]" name="managedType">Java.Lang.Object</attr>
来源:https://gist.github.com/brendanzagaeski/9607158#file-metadata-xml-L74-L76
对于您的另一个问题,您可以通过<remove-node>
删除节点。
您可以执行以下操作:
<!-- The bindings generator does not currently handle cases where a subclass provides an abstract override for an
abstract method. From what I've seen, there is no need to keep abstract overrides of abstract methods in the
binding, so we can remove them.
Error message: Error CS0533: `SomeMethodName' hides inherited abstract member `SomeMethodName' (CS0533) -->
<remove-node path="/api/package[@name='com.socialize.entity']/class[@name='SocializeActionFactory']/method[@name='postFromJSON' and count(parameter)=2 and parameter[1][@type='org.json.JSONObject'] and parameter[2][@type='T']]" />
<remove-node path="/api/package[@name='com.socialize.entity']/class[@name='SocializeActionFactory']/method[@name='postToJSON' and count(parameter)=2 and parameter[1][@type='T'] and parameter[2][@type='org.json.JSONObject']]" />
来源: https://gist.github.com/brendanzagaeski/9607158#file-metadata-xml-L63-L68
请注意,您需要根据自己的包名和类名调整这些示例。