How to fix the Error "Connection Closed" when opening Xamarin XML Designer

Bobby Lin 20 Reputation points
2024-01-05T12:10:36.9366667+00:00

When I am trying to design an Android interface using the Xamarin XML Designer, the designer reports a "Connection closed" error. How do I fix itxa

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
0 comments No comments
{count} votes

Accepted answer
  1. Graham McKechnie 316 Reputation points
    2024-01-06T01:59:48.26+00:00

    The Xamarin XML designer is not worth using. About, the only use I would consider is to maybe use it in a quick view of the XML to check something. The designer hasn't had any attention for 3-4 years and in my opinion, is a total waste of time even thinking about using it. If you haven't already got Android Studio installed, install it and then use it for every XML layout that your app requires.

    One simple way to ease the pain is to create an identically named app in Android Studio and then every time you need to create a new layout use its designer to create your layout. Once done, copy the new XML file to Resource/layout folder in your Xamarin project and build your app. No changes necessary when you come to convert the project to .Net8.

    As your app grows, you may want to consider using something like Beyond Compare, so you can open both layouts just to compare. If down the track you need to make changes then always make them using the Android Studio designer and then just push those changes to the Xamarin file. That setup is workable and you get to use the best designer in the business.


0 additional answers

Sort by: Most helpful