Forum Visual Studio

Continual errors saving resource file

I'm using Xamarin Studio Version 5.5 (build 227).

I have recently installed it on a new machine along with the Android SDKs (23.0.5).

First problem is that whenever I opt to edit a .XAML file I get the error message that the layout renderer has disconnected. But this is not the main problem as I normally prefer to edit the "xml" manually.

The main problem is that if I edit the resource layout I cannot then save the changes unless I quit Xamarin Studio. Using File menu to save the file errors, closing the file - which prompts a save) errors and opting to do a build goes into an endless loop (presumably trying and failing to save the changes).

This is frustrating as I'm in a "make the UI a bit better" phase of development.

Any suggestions?

Many thanks.


  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    Thanks for the report. This is a side-effect of the breakage in the designer. You can either downgrade to Android SDK Tools 23.0.2, or open the AXML file from the Solution pad using "[context menu] -> Open With -> Source Code Editor".

    Exception message and stack trace

    // System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Connection closed
    //    at Xamarin.AndroidDesigner.JavaProcessConnection.GetResponse(BinaryMessage message, Int32 timeout)
    //    at Xamarin.AndroidDesigner.JavaProcessConnection.SendMessage(BinaryMessage message)
    //    at Xamarin.AndroidDesigner.DesignerProject.ResolveResourceFiles(ResourceChange[] changes)
    //    at Xamarin.AndroidDesigner.AndroidDesignerSession.SaveAll()
    //    at MonoDevelop.MonoDroid.Gui.AndroidDesignerView.Save()
    //    at MonoDevelop.Ide.Gui.Document.Save()
    //    at MonoDevelop.Ide.Gui.ViewCommandHandlers.OnSaveFile()
    //    --- End of inner exception stack trace ---
    //    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
    //    at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
    //    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    //    at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
    //    at MonoDevelop.Components.Commands.CommandHandlerInfo.Run(Object cmdTarget, Command cmd)
    //    at MonoDevelop.Components.Commands.CommandManager.<>c__DisplayClassb.<DispatchCommand>b__2()
    //    at MonoDevelop.Components.Commands.CommandManager.DispatchCommand(Object commandId, Object dataItem, Object initialTarget, CommandSource source)
  • yromulusyromulus GBMember

    Many thanks Brendan - that worked a treat. Apologies for not associating the two problems but hopefully anyone else getting what I was getting won't now do the same! Cheers.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    No worries at all. I wasn't sure if it was the same issue until I saw this forum thread and tested it out, so it was great to have this report!

Sign In or Register to comment.