Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NoSuchMethodError when calling Navigation.PushPopupAsync() #2

Open
Kas-code opened this issue Dec 1, 2023 · 3 comments
Open

Comments

@Kas-code
Copy link

Kas-code commented Dec 1, 2023

Simplified example:

public partial class MyPage : ContentPage
{
        public MyPage()
        {
            InitializeComponent();
        }

        public async void PushPopup()
        {
            await Navigation.PushPopupAsync(new MyPopupPage());
        }
}

Upon calling Navigation.PushPopupAsync() the app crashes and we get this stack trace:

Fatal Exception: java.lang.NoSuchMethodError
    no non-static method "Landroid/view/WindowInsets;.getSystemGestureInsets()Landroid/graphics/Insets;"
    crc649782702a6ced2686.PopupPageRenderer.n_onLayout (PopupPageRenderer.java)
    crc649782702a6ced2686.PopupPageRenderer.onLayout (PopupPageRenderer.java:62)
    android.view.View.layout (View.java:20857)
    com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374) 

This is after an upgrade from Xamarin to MAUI.
The nuget package for RGPopup has been changed from the Xamarin one to this one.
We are calling .UseMauiRGPopup() on the builder in MauiProgram.cs
Popup pages throughout the app have been changed to inherit from RGPopup.Maui.Pages
All popups in the app throw this error.
Please advise.

@leo-mck
Copy link

leo-mck commented Dec 29, 2023

This problem happens when accessing SystemGestureInsets here when running android with API version < 29.

@eliasribeiro
Copy link

Same problem here. The RGPopup sample also has this error.

@microspaze
Copy link
Owner

Fixed by version 1.0.4 https://www.nuget.org/packages/RGPopup.Maui/1.0.4

Thanks very much for this issue reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants