Issue
I have used MAUI preview .and VS 2022 .When the application is run and used all functionality and press system back button and cloes the app.After cloesing the app I'm try to oepn the app that time
"{Java.Lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
"
Is Occure on my mainActivity page .
protected override void OnCreate(Bundle savedInstanceState)
{
try
{
// TEXTVIEW
base.OnCreate(savedInstanceState);
initFontScale();
Microsoft.Maui.Essentials.Platform.Init(this, savedInstanceState);
UserDialogs.Init(this);
//Microsoft.Maui.Essentials.Platform.Init(this, savedInstanceState);
}
catch (System.Exception ex)
{
}
}
How to resolve this error .
Solution
Seems like this was reported and according to the comment in there, this should be fixed for preview 11+: github.com/dotnet/maui/issues/3511 Which VS2022 have you installed?
Installing Visual Studio 2022 v17.1 Preview 2 should give you .NET MAUI Preview 11 which should resolve the issue.
Answered By - Gerald Versluis
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.