Simple example Main Page (which is a simple content page with a button) Second Page (which is the tabbed page displayed when the button is pressed)
The code works under Windows, but on Android crashes during startup with "fragment viewid not found"
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TabbedMaui.MainPage"
xmlns:local="clr-namespace:TabbedMaui"
>
<Button
Text="Go" Clicked="Button_Clicked"></Button>
ed</ContentPage>
The second page is shown in the code block
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TabbedMaui.SecondPage"
xmlns:local="clr-namespace:TabbedMaui"
x:DataType="local:SecondPage"
Title="Some title" BackgroundColor="blue">
<ContentPage Title="Page 1" BackgroundColor="Red">
<VerticalStackLayout >
<Label Text="Hello"></Label>
</VerticalStackLayout>
</ContentPage>
<ContentPage Title="Page 2" BackgroundColor="Yellow"></ContentPage>
<ContentPage Title="Page 3"></ContentPage>
</TabbedPage>
This issue can be reproduced here. And it is a known issue that being tracked in the link below, you can follow up there.
https://github.com/dotnet/maui/issues/7615
Currently, you cannot mix TabbedPage together with
MAUI Shellas the official docs states clearly below:As an alternative workaround, you may be able to set the
App.MainPageto aTabbedPageto get it resolved.