Xamarin.Forms: Error parsing XML: not well-formed (invalid token) when compiling Android

Posted by

Suddenly my Android Xamarin.Forms project stopped compiling because of a couple of corrupt XML files. The error message is: “Error parsing XML: not well-formed (invalid token)”

Turns out that at that the source resource files in the

C:\Users\Geir\AppData\Local\Xamarin\Xamarin.Android.Support.v7.AppCompat\23.3.0.0\embedded\res\

folder had been corrupted, probably by my antivirus program, there was a path to Avira among the unreadable (I have no clue what kind of encoding or content was in the file – it was not XML)

This file is on compile time copied into the  \obj\Debug\resourcecache\[some-identifier]\res\ folder where it is of course unparsable as XML.

Hope this helps someone, took me a while to figure out from where the xml file was copied (of course file search should have come to my mind an hour earlier than it did 🙂 )

Capture

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s