.Net MAUI use multi Shell by Flyout page goes blank

帆 魏 1 Reputation point
2023-01-04T02:25:49.753+00:00

I create a demo app by Net MAUI, using Flyout to navigate to three Shell page. In Windows is good, but in android, the page goes to blank.

first time:

275845-%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE-20230104102245.png

go in again:

275865-%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE-20230104102256.png

and debug output says

[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Emoji2.dll  
Loaded assembly: /data/data/com.iNexBot.NexDroid/files/.__override__/Xamarin.AndroidX.Emoji2.dll [External]  
[EGL_emulation] eglMakeCurrent: 0x709f4b86bfe0: ver 3 1 (tinfo 0x709f3023b7c0)  
[TabLayout] MODE_SCROLLABLE + GRAVITY_FILL is not supported, GRAVITY_START will be used instead  
[TabLayout] MODE_SCROLLABLE + GRAVITY_FILL is not supported, GRAVITY_START will be used instead  
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.AppCompat.AppCompatResources.dll  

in AppShell.xaml

<?xml version="1.0" encoding="UTF-8" ?>  
<Shell  
    x:Class="NexDroid.AppShell"  
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"  
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"  
    xmlns:local="clr-namespace:NexDroid"  
    xmlns:pages="clr-namespace:NexDroid.Pages"  
    xmlns:debug="clr-namespace:NexDroid.Pages.Debug"  
    xmlns:parametes="clr-namespace:NexDroid.Pages.Parameters"  
    FlyoutBehavior="Flyout">  
    <ShellContent ContentTemplate="{DataTemplate pages:Connect}" />  
    <FlyoutItem Title="操作" Route="MainPage">  
        <ShellContent ContentTemplate="{DataTemplate local:MainPage}" />  
    </FlyoutItem>  
    <FlyoutItem Title="调试">  
        <ShellContent ContentTemplate="{DataTemplate debug:DebugShell}" />  
    </FlyoutItem>  
    <FlyoutItem Title="参数">  
        <ShellContent ContentTemplate="{DataTemplate parametes:ParametersShell}" />  
    </FlyoutItem>  
</Shell>  

in MainPage.xaml

<?xml version="1.0" encoding="UTF-8" ?>  
<Shell  
    x:Class="NexDroid.MainPage"  
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"  
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"  
    xmlns:pages="clr-namespace:NexDroid.Pages"  
    xmlns:operation="clr-namespace:NexDroid.Pages.Operation"  
    >  
    <TabBar>  
        <Tab Title="点动" Route="Operation/Jog">  
            <ShellContent ContentTemplate="{DataTemplate operation:Jog}" />  
        </Tab>  
        <Tab Title="拖拽" Route="Operation/Drag">  
            <ShellContent ContentTemplate="{DataTemplate operation:Drag}" />  
        </Tab>  
    </TabBar>  
</Shell>  

is there something wrong?

is there i using wrong?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,859 questions
{count} votes