docs-maui
docs-maui copied to clipboard
Shell Navigation doesn't render the next page on Android. Shell Current State shows DnsSafeHost - System Invalid Exception.
Shell Navigation doesn't render the next page on Android. Shell Current State shows DnsSafeHost - System Invalid Exception.
The steps -
-
Have set the AppShell as MainPage
MainPage = new AppShell();
-
Routing registered for second page on AppShell.xaml.cs
Routing.RegisterRoute("secondpage", typeof(SecondPage));
- From the initial page, tries to navigate to next page on button click
private void Button_OnClicked(object sender, EventArgs e) { Shell.Current.GoToAsync("secondpage"); }
Behavior -
The breakpoint redirects to the second page. But UI is never rendered.
When checked the current state of the Shell, I get the following result -
When checked the state when just after setting Shell, gives the same result. No crashes or errors. Just the navigation is blocked.
Have followed all the steps for Shell navigation, still it doesn't work on my Maui migrated project.