So I’ve been fiddling with some my layout files, trying to style some listview items. It seems like every time I change a layout file, I get this:
Severity Code Description Project File Line Suppression State
Error (MSB4018) The "GenerateAndroidResources" task failed unexpectedly.
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: startIndex
at System.String.IndexOf(Char value, Int32 startIndex, Int32 count)
at System.String.IndexOf(Char value, Int32 startIndex)
at k.l.TrySplitError(TaskLoggingHelper Log, Boolean aError, String aMsg)
at k.l.A(TaskLoggingHelper , String , String , String , Boolean& )
at RemObjects.Oxygene.MSBuild.Android.GenerateAndroidResources.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() com.XYZ.ABC C:\Program Files (x86)\MSBuild\RemObjects Software\Elements\RemObjects.Elements.Cooper.Android.targets 213
and most of the time, if I clean the solution and do a rebuild all, this error goes away.
Unfortunately, I’m trying iterative changes to the layouts, so the edit / build / fail / clean / rebuild all cycle is not enjoyable. I haven’t built a test project yet to try and duplicate this so I can upload it to a dropbox. Let me know if that will be helpful.