我一直在尝试在GitHub(https://github.com/mattwhetton/TokenAutoComplete)上为此令牌自动完成文本视图项目创建一个绑定项目。我基本上试图在Xamarin / Mono(C#)中将它移植给我们
我立即收到以下错误:
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)'
我理解错误并试图添加一个转换来使TokenImageSpan内部类更容易访问,但我似乎无法获得语法rioght。我尝试过以下两种变体:
<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>
但似乎都没有用,只是给我以下错误:
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.
我猜测(可能是错误的)它与它们有关的东西是嵌套类?!
答案 0 :(得分:0)
解决方案:
添加Metadata.xml字符串
<attr path="/api/package[@name='com.tokenautocomplete']/class[@name='TokenCompleteTextV ew.TokenImageSpan']" name="visibility">public</attr>