I am trying to generate Xamarin bindings for the library:
https://github.com/noties/Markwon
https://repo1.maven.org/maven2/io/noties/markwon/core/4.6.1/core-4.6.1.aar
I have not modified the metadata.xml
or anything yet. I have added the aar as a LibraryProjectZip
, but I get issues when trying to compile it.
0>obj/Debug/generated/src/IO.Noties.Markwon.SpannableBuilder.cs(10,68): Error CS0738 : 'SpannableBuilder' does not implement interface member 'IAppendable.Append(char)'. 'SpannableBuilder.Append(char)' cannot implement 'IAppendable.Append(char)' because it does not have the matching return type of 'IAppendable'.
0>obj/Debug/generated/src/IO.Noties.Markwon.SpannableBuilder.cs(10,68): Error CS0738 : 'SpannableBuilder' does not implement interface member 'IAppendable.Append(ICharSequence?)'. 'SpannableBuilder.Append(ICharSequence)' cannot implement 'IAppendable.Append(ICharSequence?)' because it does not have the matching return type of 'IAppendable'.
0>obj/Debug/generated/src/IO.Noties.Markwon.SpannableBuilder.cs(10,68): Error CS0738 : 'SpannableBuilder' does not implement interface member 'IAppendable.Append(ICharSequence?, int, int)'. 'SpannableBuilder.Append(ICharSequence, int, int)' cannot implement 'IAppendable.Append(ICharSequence?, int, int)' because it does not have the matching return type of 'IAppendable'.
0>obj/Debug/generated/src/IO.Noties.Markwon.Utils.NoCopySpannableFactory.cs(56,79): Warning CS0108 : 'NoCopySpannableFactory.Instance' hides inherited member 'SpannableFactory.Instance'. Use the new keyword if hiding was intended.
For testing purposes, if I delete the global::Java.Lang.IAppendable
from the interfaces of SpannableBuilder
I get further along, but it breaks on a Java issue:
1>obj/Debug/android/src/mono/io/noties/markwon/core/CorePlugin_OnTextAddedListenerImplementor.java(4,8): Error JAVAC0000 javac: error: CorePlugin_OnTextAddedListenerImplementor is not abstract and does not override abstract method onTextAdded(MarkwonVisitor,String,int) in OnTextAddedListener public class CorePlugin_OnTextAddedListenerImplementor
The generated code for that class is here:
package mono.io.noties.markwon.core;
public class CorePlugin_OnTextAddedListenerImplementor
extends java.lang.Object
implements
mono.android.IGCUserPeer,
io.noties.markwon.core.CorePlugin.OnTextAddedListener
{
/** @hide */
public static final String __md_methods;
static {
__md_methods =
"";
mono.android.Runtime.register ("IO.Noties.Markwon.Core.CorePlugin+IOnTextAddedListenerImplementor, Markwon", CorePlugin_OnTextAddedListenerImplementor.class, __md_methods);
}
public CorePlugin_OnTextAddedListenerImplementor ()
{
super ();
if (getClass () == CorePlugin_OnTextAddedListenerImplementor.class)
mono.android.TypeManager.Activate ("IO.Noties.Markwon.Core.CorePlugin+IOnTextAddedListenerImplementor, Markwon", "", this, new java.lang.Object[] { });
}
private java.util.ArrayList refList;
public void monodroidAddReference (java.lang.Object obj)
{
if (refList == null)
refList = new java.util.ArrayList ();
refList.add (obj);
}
public void monodroidClearReferences ()
{
if (refList != null)
refList.clear ();
}
}