Binding project inconsistent accessibility on inner classes but can't get transform syntax right

僤鯓⒐⒋嵵緔 提交于 2019-12-11 05:05:30

问题


I've been trying to create a binding project for this token auto complete text view project on GitHub (https://github.com/mattwhetton/TokenAutoComplete). I'm basically trying to port it to us in Xamarin / Mono (C#)

I've been immediately getting the following error:

Inconsistent accessibility: parameter type 'Com.Tokenautocomplete.TokenCompleteTextView.TokenImageSpan' is less accessible than method 'Com.Tokenautocomplete.TokenCompleteTextView.TokenTextWatcher.RemoveToken(Com.Tokenautocomplete.TokenCompleteTextView.TokenImageSpan, Android.Text.IEditable)'

I understand the error and tried to add a transform to make the TokenImageSpan inner class more accessible, but I just cant seem to get the syntax rioght. I've tried the 2 variations below:

<attr path="/api/package[@name='Com.Tokenautocomplete']/class[@name='TokenImageSpan']/class[@name='TokenImageSpan']"
                name="visibility">public</attr>

<attr path="/api/package[@name='Com.Tokenautocomplete.TokenCompleteTextView']/class[@name='TokenImageSpan']"
                name="visibility">public</attr>

But neither seems to work, both just give me the following errors:

BINDINGSGENERATOR : warning BG8A04: <attr path="/api/package[@name='Com.Tokenautocomplete.TokenCompleteTextView']/class[@name='TokenImageSpan']"/> matched no nodes.

BINDINGSGENERATOR : warning BG8A04: <attr path="/api/package[@name='Com.Tokenautocomplete']/class[@name='TokenImageSpan']/class[@name='TokenImageSpan']"/> matched no nodes.

I'm guessing (probably incorrectly) that its something to do with them being nested classes?!


回答1:


Solution:

add in Metadata.xml string

<attr path="/api/package[@name='com.tokenautocomplete']/class[@name='TokenCompleteTextV ew.TokenImageSpan']" name="visibility">public</attr>


来源:https://stackoverflow.com/questions/31450487/binding-project-inconsistent-accessibility-on-inner-classes-but-cant-get-transf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!