当我在 Xamarin.Android 项目中并使用 Java 绑定库时,我几乎总是会遇到一些警告。我收到以下警告:
7>BINDINGSGENERATOR : warning BG8800: Unknown parameter type
System.Xml.XmlReader in method CreateFromXml in managed type Android.Content.Res.ColorStateList.
7>BINDINGSGENERATOR : warning BG8800: Unknown parameter type
System.Xml.XmlReader in method CreateFromXml in managed type Android.Content.Res.ColorStateList.
7>BINDINGSGENERATOR : warning BG8800: Unknown parameter type
System.Xml.XmlReader in method ParseBundleExtras in managed type Android.Content.Res.Resources.
7>BINDINGSGENERATOR : warning BG8800: Unknown parameter type
System.Xml.XmlReader in method CreateFromXml in managed type Android.Graphics.Drawables.Drawable.
7>BINDINGSGENERATOR : warning BG8800: Unknown parameter type
System.Xml.XmlReader in method CreateFromXml in managed type Android.Graphics.Drawables.Drawable.
7>BINDINGSGENERATOR : warning BG8800: Unknown parameter type
System.Xml.XmlReader in method CreateFromXmlInner in managed type Android.Graphics.Drawables.Drawable.
7>BINDINGSGENERATOR : warning BG8800: Unknown parameter type
System.Xml.XmlReader in method CreateFromXmlInner in managed type Android.Graphics.Drawables.Drawable.
7>BINDINGSGENERATOR : warning BG8800: Unknown parameter type
System.Xml.XmlReader in method Inflate in managed type Android.Graphics.Drawables.Drawable.
7>BINDINGSGENERATOR : warning BG8800: Unknown parameter type
System.Xml.XmlReader in method Inflate in managed type Android.Graphics.Drawables.Drawable.
7>BINDINGSGENERATOR : warning BG8800: Unknown parameter type
System.Xml.XmlReader in method ParseIntent in managed type Android.Content.Intent.
7>BINDINGSGENERATOR : warning BG8800: Unknown parameter type System.Xml.XmlReader in method ReadFromXml in managed type Android.Content.IntentFilter.
我的第一个想法是它缺少 System.XML.XMLReader NuGet 依赖项,但它没有任何意义。我添加了依赖项,但没有工作。
后来,查看代码(例如android.content.Intent),我意识到在解析所需的类时不知何故出错了。它不是 System.XML .Net 框架之一,而是来自 Android 框架的 XMLReader 类。
关于将绑定过程指向正确方向的任何想法,明确地告诉选择什么类?一些 metadata.xml 规则?谢谢
编辑:我正在尝试这个:
<attr path="/api/package[@name='android.content.res']/class[@name='Resources']/method[@name='parseBundleExtras']/parameter[0]"
name="type">android.content.res.XmlResourceParser</attr>
可以在这里看到,但解析器没有找到任何东西,即使使用了不太细粒度的查询:
Metadata.xml(15, 4) warning BG8A04: <attr path="/api/package[@name='android.content.res']/class[@name='Resources']"/> matched no nodes. Seems that I can't make that metadata changes in Android framework directly?