Maui tells me I have a problem but surely it could narrow it down

WillAutioItrax 196 Reputation points

In my Maui app, I get the message:

[0:] Microsoft.Maui.Controls.Element: Warning: Microsoft.Maui.Controls.Label is already a child of Microsoft.Maui.Controls.Grid. Remove Microsoft.Maui.Controls.Label from Microsoft.Maui.Controls.Grid before adding to Microsoft.Maui.Controls.Grid.

Java.Lang.IllegalStateException: 'The specified child already has a parent. You must call removeView() on the child's parent first.'

If the compiler can tell me there is a problem with a Grid and a Label, surely it can tell me the name of the Grid and the Label, or a line number or something to help me find the source of the problem. I think this is a bug in the compiler - a serious short coming.

How else can I find the Grid and Label responsible for this issue?


A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,885 questions
{count} votes