MAUI: App-Breaking Issues on Android Version 8

Aleena George 30 Reputation points
2024-01-10T15:15:55.3566667+00:00

I am facing App-Breaking issues in my MAUI project only on Android Version 8. There are no issues on Android Versions 10, 11, and 12.

Demo Project:

I have created a demo project with the issues and upload here

In this demo project, we have two options. We tap on the first option, which is a Popup page, and tap on the second option, which is a content page. This project works fine on Android Version 10, 11, and 12. But in Android version 8, when we tap on both options, the app breaks and gets exceptions.

I am getting the exception below when loading the Popup page:

Java.Lang.NoSuchMethodError: 'no non-static method "Landroid/view/WindowInsets;.getSystemGestureInsets()Landroid/graphics/Insets;"'

I am getting the exception below when loading the Content page:

Java.Lang.RuntimeException: 'Canvas: trying to draw too large(131320128bytes) bitmap.'

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

Accepted answer
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 79,706 Reputation points Microsoft Vendor
    2024-01-12T09:03:22.9566667+00:00

    Hello,

    I am using the RGPopup Maui package for the PopUp page in this project, at that time I am facing this exception.

    RGPopup Maui only support Android 10 or later. Some API added in the Android 10 or later, it cannot be used in the Android 8.0.

    It is recommended to use Popup - .NET MAUI Community Toolkit , I test it, it is working in android 8.0.

    Java.Lang.RuntimeException: 'Canvas: trying to draw too large(131320128bytes) bitmap.'

    This issue is related to ic_light_mode_xx.png and ic_dark_mode_xx.png, the resolution(1562 * 2779) is too big. I change resolution to 711 * 1692 for testing, it is working as normal.

    Best Regards, Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.