Xamarin.forms上的Java绑定库中未找到覆盖方法
我正在为Xamarin.Forms创建一个Java绑定库,以包装.jar库。
编译时我遇到了几个错误。
我已经解决了使用“ transforms”部分中具有相同签名的多种方法给出的问题。
尽管如此,编译器仍在不断提出适合此方法的替代:
[Register ("compareTo", "(Ljava/lang/Object;)I", "GetCompareTo_Ljava_lang_Object_Handler")]
public override unsafe int CompareTo (global::Java.Lang.Object o)
{
const string __id = "compareTo.(Ljava/lang/Object;)I";
try {
JniArgumentValue* __args = stackalloc JniArgumentValue [1];
__args [0] = new JniArgumentValue ((o == null) ? IntPtr.Zero : ((global::Java.Lang.Object) o).Handle);
var __rm = _members.InstanceMethods.InvokeAbstractInt32Method (__id, this, __args);
return __rm;
} finally {
global::System.GC.KeepAlive (o);
}
}
此外,UP方法的所有类别没有元数据参考,并且该方法本身没有。这使得甚至很难尝试在“ metadata.xml”中删除节点。
为了给您一个线索,可以在以下类中找到“ compareTo”方法:
Java.Nio.Charset.Charset
基本上是生成器继承的类,以便在
public abstract partial class CustomCharset
我尝试忽略整个类之前创建一个,在应用程序上产生意外的后果,我是我即将发展,我想知道是否有人经历过类似的事情。如何解决?
I'm creating a Java Binding Library for Xamarin.Forms in order to wrap a .jar library.
I got a couple of errors while compiling.
I already solved an issue given by multiple methods having the same signature using "Metadata.xml" in "Transforms" section.
Still, the compiler keeps on bringing out that an appropriate override for this method can't be found:
[Register ("compareTo", "(Ljava/lang/Object;)I", "GetCompareTo_Ljava_lang_Object_Handler")]
public override unsafe int CompareTo (global::Java.Lang.Object o)
{
const string __id = "compareTo.(Ljava/lang/Object;)I";
try {
JniArgumentValue* __args = stackalloc JniArgumentValue [1];
__args [0] = new JniArgumentValue ((o == null) ? IntPtr.Zero : ((global::Java.Lang.Object) o).Handle);
var __rm = _members.InstanceMethods.InvokeAbstractInt32Method (__id, this, __args);
return __rm;
} finally {
global::System.GC.KeepAlive (o);
}
}
Additionally, the owning class of the up method has NO METADATA REFERENCE, as well as the method itself doesn't have one. This makes it difficult even to try removing the node in "Metadata.xml".
To give you a clue, the method "CompareTo" can be found in the following class:
Java.Nio.Charset.Charset
that basically is the class the generator inherits in order to create a
public abstract partial class CustomCharset
Before I try to ignore the entire class, with unexpected consequences on the app I'm about to develop, I would like to know if anyone has ever gone through something similar please. How to solve?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论