androidxamarinvisual-studio-macandroid-designer

Error loading android axml files Visual Studio Mac


Visual Studio's android designer isn't loading axml files. enter image description here

This happens on every single android project. Tried downgrading the VS version, installed new one from alpha channel, tried selecting other theme in designer, nothing helped.

Here is the error:

    System.ArgumentNullException: Value cannot be null.
Parameter name: path1
  at System.IO.Path.Combine (System.String path1, System.String path2, System.String path3) [0x0002a] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/Path.cs:849 
  at Xamarin.AndroidDesigner.DesignerProject+<>c.<GetLibraryProjectThemes>b__118_0 (System.String l) [0x00000] in /Users/vsts/agent/2.124.0/work/1/s/Xamarin.Designer.Android/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/DesignerProject.cs:532 
  at System.Linq.Enumerable+SelectListIterator`2[TSource,TResult].MoveNext () [0x00036] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/Select.cs:365 
  at System.Linq.Enumerable+WhereEnumerableIterator`1[TSource].MoveNext () [0x0004e] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/Where.cs:146 
  at System.Linq.Enumerable+SelectManySingleSelectorIterator`2[TSource,TResult].ToList () [0x0002d] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/SelectMany.cs:257 
  at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00015] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/ToCollection.cs:30 
  at Xamarin.AndroidDesigner.DesignerProject.GetLibraryProjectThemes () [0x00037] in /Users/vsts/agent/2.124.0/work/1/s/Xamarin.Designer.Android/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/DesignerProject.cs:531 
  at Xamarin.AndroidDesigner.DesignerProject.GetIsProjectTheme (System.String themeName) [0x0000e] in /Users/vsts/agent/2.124.0/work/1/s/Xamarin.Designer.Android/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/DesignerProject.cs:544 
  at Xamarin.AndroidDesigner.DesignerSessionParams.GetData (Xamarin.AndroidDesigner.AndroidDesignerSession session, Xamarin.AndroidDesigner.AndroidRenderSession renderer) [0x00154] in /Users/vsts/agent/2.124.0/work/1/s/Xamarin.Designer.Android/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/DesignerSessionParams.cs:209 
  at Xamarin.AndroidDesigner.AndroidRenderSession+<InitSession>d__115.MoveNext () [0x00224] in /Users/vsts/agent/2.124.0/work/1/s/Xamarin.Designer.Android/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidRenderSession.cs:783 

Anyone has any clue what's going on?


Solution

  • This seems like a bug in Visual Studio/Xamarin for mac at least on beta channel. Don't have access to Windows version so can't say. Downgrade to stable and it should be fixed. I can't use the current stable release at it fails to compile with certain packages.