xamarin bind 'Jsgf' does not implement interface member 'IIterable.Iterator()

614 views Asked by At

I am trying to implement the new version of PocketSphinx by this link i have created a new binding project and a have compilation errors.

Error CS0738 'Jsgf' does not implement interface member 'IIterable.Iterator()'. 'Jsgf.Iterator()' cannot implement 'IIterable.Iterator()' because it does not have the matching return type of 'IIterator'. PocketSphinxDroid \PocketSphinxDroid\obj\Debug\generated\src\Edu.Cmu.Pocketsphinx.Jsgf.cs 9 Active

i have tried adding to metatdata.xml file

<attr path="/api/package[@name='Edu.Cmu.Pocketsphinx']/class[@name='Jsgf']/method[@name='Iterator']" name="managedType">Java.Util.IIterator</attr>

or

  <attr path="/api/package[@name='Edu.Cmu.Pocketsphinx']/class[@name='Jsgf']/method[@name='Iterator']" name="managedType">Java.Lang.IIterator</attr>

but still get the error

1

There are 1 answers

1
HelloWorld On

Should be like this:

<attr path="/api/package[@name='edu.cmu.pocketsphinx']/class[@name='Jsgf']/method[@name='iterator' and count(parameter)=0]" name="managedReturn">Java.Util.IIterator</attr>

And you are probably missing these ones as well:

  <attr path="/api/package[@name='edu.cmu.pocketsphinx']/class[@name='JsgfIterator']/method[@name='next' and count(parameter)=0]" name="managedReturn">Java.Lang.Object</attr>
  <attr path="/api/package[@name='edu.cmu.pocketsphinx']/class[@name='NBestIterator']/method[@name='next' and count(parameter)=0]" name="managedReturn">Java.Lang.Object</attr>
  <attr path="/api/package[@name='edu.cmu.pocketsphinx']/class[@name='NBestList']/method[@name='iterator' and count(parameter)=0]" name="managedReturn">Java.Util.IIterator</attr>
  <attr path="/api/package[@name='edu.cmu.pocketsphinx']/class[@name='NGramModelSet']/method[@name='iterator' and count(parameter)=0]" name="managedReturn">Java.Util.IIterator</attr>
  <attr path="/api/package[@name='edu.cmu.pocketsphinx']/class[@name='NGramModelSetIterator']/method[@name='next' and count(parameter)=0]" name="managedReturn">Java.Lang.Object</attr>
  <attr path="/api/package[@name='edu.cmu.pocketsphinx']/class[@name='SegmentIterator']/method[@name='next' and count(parameter)=0]" name="managedReturn">Java.Lang.Object</attr>
  <attr path="/api/package[@name='edu.cmu.pocketsphinx']/class[@name='SegmentList']/method[@name='iterator' and count(parameter)=0]" name="managedReturn">Java.Util.IIterator</attr>