Hi to everybody,
I am coding in Xamarin.Android for last 4 years and I very like the platform! But now it's partially broken on my computer. Recently I tried to create new testing project but I failed to build even the simplest blank project automatically generated by Visual Studio Community 2019 (16.6.0).
I tried to reinstall whole Visual Studio but it made no change. I am not sure where to search for the problem.
This is warning (and later error when I try to build) I get immediately after creating new blank project both in native Xamarin.Android or in Android project of Xamarin.Forms. In error window I get this warning as number one, without showing in which file it occurs.
Severity Code Description Project File Line Suppression State
Warning System.Xml.XmlException: Invalid character in the given encoding. Line 1, position 2444.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.InvalidCharRecovery(Int32& bytesCount, Int32& charsCount)
at System.Xml.XmlTextReaderImpl.GetChars(Int32 maxCharsCount)
at System.Xml.XmlTextReaderImpl.ReadData()
at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
at Xamarin.Android.Tasks.ReadLibraryProjectImportsCache.RunTask()
at Xamarin.Android.Tasks.AndroidTask.Execute()
I have yellow exclamation marks on all references of the project: Mono.Android, System, System.Core,... and when I click them they disappear.
Another warnings are: The referenced component 'Mono.Android' could not be found... and so on
In Tools-Options-Xamarin I have these values
Java: C:\Program Files\Android\Jdk\microsoft_dist_openjdk_1.8.0.25
Android SDK: C:\Program Files (x86)\Android\android-sdk
But I have installed everything as far as I know. At least my long term project in Xamarin.Android is running without errors.
Recently I installed Android NDK and only then I tried to test it with new Xamarin.Android project.
I have no idea what did I make wrong and worse, how to fix it.
Already have three evenings in it
Thank you for advice.