I'm facing some warnings nearly always when I'm on a Xamarin.Android project, and using a Java Binding Library. I obtain the following warnings:
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.
My first thought was that it was missing the System.XML.XMLReader NuGet dependency, but it had no sense. I added the dependency, and didn't work.
Later, viewing the code (e.g. android.content.Intent), I realized that somehow it's getting wrong when resolving the required class. It's not the System.XML .Net framework one, but XMLReader class from Android Framework.
Any idea on pointing the binding proccess to the right direction, telling explicitely what class to pick? Some metadata.xml rule? Thanks
EDIT: I'm trying with this:
<attr path="/api/package[@name='android.content.res']/class[@name='Resources']/method[@name='parseBundleExtras']/parameter[0]"
name="type">android.content.res.XmlResourceParser</attr>
as can be seen here, but parser is not finding anything, even using a less fine-grained query:
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?
To get correct assemblies
All you need is System.Xml
Most common path to the assembly relatively from Visual Studio folder:
...\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll
If it shows multiple assemblies with same name, don't worry, you can pick any of it. Don't use GAC or nuget package. Always look for Assemblies corresponding to your project type which is always t the Assemblies tab in Preference Manager.
Before attempting to build after the fix, clean the project or do a clean build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With