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 .
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With