Skip to content

Android Release : MainPage = new NavigationPage(new ContentPage()); crashes #28880

@nk54

Description

@nk54

Description

https://learn.microsoft.com/en-us/dotnet/maui/user-interface/pages/navigationpage

The code given crashes in Release mode on Android (no problem on Debug. I didn't test iOS).
Works on Windows (Debug & Release too).

public App()
{
    InitializeComponent();

    ContentPage startPage = new ContentPage() { Content = new Label() { Text = "Hello" } };

    // App Crashes
    // MainPage = new NavigationPage(startPage);

    // App starts
    MainPage = startPage;
}

I think it worked in RC1

Steps to Reproduce

Just try to set MainPage as a NavigationPage
(AppShell is too far from being ready to be used : relative navigation not supported, those kind of stuff)

Link to public reproduction project repository

https://github.com/nk54/maui_bug_navigation

Version with bug

7.0 Release Candidate 2

Last version that worked well

7.0 Release Candidate 1

Affected platforms

Android

Affected platform versions

Android 9 and up

Did you find any workaround?

Deploy my debug app of 60 MB instead of 30 MB....... (once optimized otherwise 160 MB)

Relevant log output

See last answer

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions