编辑布局文件时出错

时间:2012-05-21 15:28:06

标签: monodevelop xamarin.android

自从更新到MonoDevelop 3.0.1版以来,我一直无法使用布局文件。当我创建一个新的布局文件,然后尝试从“源”选项卡编辑它时,我收到以下错误:

System.InvalidOperationException: Layout not yet loaded
at Xamarin.AndroidDesigner.DesignerSession.SetLayoutXml (System.String xml, Boolean allowUndo) [0x000bf] in /Users/builder/data/lanes/monodevelop-mac-3.0.1/6642975f/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/DesignerSession.cs:353 
at MonoDevelop.MonoDroid.Gui.LayoutSourceEditorView.SaveContent () [0x00025] in /Users/builder/data/lanes/monodevelop-mac-3.0.1/6642975f/source/md-addins/MonoDevelop.MonoDroid/MonoDevelop.MonoDroid/Gui/AndroidDesignerView.cs:641 
at MonoDevelop.MonoDroid.Gui.LayoutSourceEditorView.Deselected () [0x00000] in /Users/builder/data/lanes/monodevelop-mac-3.0.1/6642975f/source/md-addins/MonoDevelop.MonoDroid/MonoDevelop.MonoDroid/Gui/AndroidDesignerView.cs:670 
at MonoDevelop.Ide.Gui.SdiWorkspaceWindow.SetCurrentView (Int32 newIndex) [0x00032] in /Users/builder/data/lanes/monodevelop-mac-3.0.1/6642975f/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs:571 
at MonoDevelop.Ide.Gui.SdiWorkspaceWindow+<AddButton>c__AnonStoreyB0.<>m__169 (System.Object sender, System.EventArgs e) [0x00033] in /Users/builder/data/lanes/monodevelop-mac-3.0.1/6642975f/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs:488 
at MonoDevelop.Components.Tab.OnActivated (System.EventArgs e) [0x0000d] in /Users/builder/data/lanes/monodevelop-mac-3.0.1/6642975f/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Tabstrip.cs:396 
at MonoDevelop.Components.Tab.Activate () [0x00000] in /Users/builder/data/lanes/monodevelop-mac-3.0.1/6642975f/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Tabstrip.cs:244 
at MonoDevelop.Ide.Gui.SdiWorkspaceWindow.ActiveDocumentChanged (System.Object sender, System.EventArgs e) [0x0000b] in /Users/builder/data/lanes/monodevelop-mac-3.0.1/6642975f/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs:501 
at (wrapper delegate-invoke) <Module>:invoke_void__this___object_EventArgs (object,System.EventArgs)
at (wrapper delegate-invoke) <Module>:invoke_void__this___object_EventArgs (object,System.EventArgs)
at (wrapper delegate-invoke) <Module>:invoke_void__this___object_EventArgs (object,System.EventArgs)
at (wrapper delegate-invoke) <Module>:invoke_void__this___object_EventArgs (object,System.EventArgs)
at (wrapper delegate-invoke) <Module>:invoke_void__this___object_EventArgs (object,System.EventArgs)
at (wrapper delegate-invoke) <Module>:invoke_void__this___object_EventArgs (object,System.EventArgs)
at (wrapper delegate-invoke) <Module>:invoke_void__this___object_EventArgs (object,System.EventArgs)
at MonoDevelop.Ide.Gui.Workbench.OnDocumentChanged (System.Object s, System.EventArgs a) [0x0000b] in /Users/builder/data/lanes/monodevelop-mac-3.0.1/6642975f/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs:606 
at MonoDevelop.Ide.Gui.DefaultWorkbench.OnActiveWindowChanged (System.Object sender, System.EventArgs e) [0x00075] in /Users/builder/data/lanes/monodevelop-mac-3.0.1/6642975f/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs:749
at Gtk.Notebook.SwitchPageSignalCallback (IntPtr arg0, IntPtr arg1, UInt32 arg2, IntPtr gch) [0x00000] in <filename unknown>:0 

我没有发现一个错误,表明其他人正在经历这个问题。它可能是我环境中的某种配置问题吗?我正在使用Mono for Android 4.2.1.196198126。

1 个答案:

答案 0 :(得分:0)

此问题已在MonoDevelop 3.0.2版中得到解决。 http://monodevelop.com/Download/Release_Notes/Release_Notes_for_MonoDevelop_3.0.2