Skip to content

Problem with iPub.FMX.SystemBars on Delphi 13 with Android old devices #16

@elcharlie

Description

@elcharlie

After upgrading from Delphi 12 to Delphi 13, an FMX Android app crashes on some devices running Android 10 (API 29) or older. The crash happens on startup (or as soon as window insets are applied) with:

java.lang.NoSuchMethodError: No static method systemBars()I in class android.view.WindowInsets$Type

The stack trace points to FireMonkey Java code:

com.embarcadero.firemonkey.form.FormView$1.onApplyWindowInsets(FormView.java:31)

This method appears to call WindowInsets.Type.systemBars() which is API 30+, causing NoSuchMethodError on Android 10 and below (depending on device/ROM restrictions).

Affected versions

Works on: Delphi 12 (same app / same code)

Fails on: Delphi 13 (same app / same code)

Android versions affected: Android 10 (API 29) and below (observed on some older devices; on newer Android versions it works)

Steps to reproduce (minimal)

Create a new blank FMX Android application.

Add a unit in uses that (directly or indirectly) causes an OnApplyWindowInsets listener to be used (example: a “system bars” helper library that calls setOnApplyWindowInsetsListener or registers an FMX platform service related to system bars/insets).

Build & install with Delphi 13.

Run on an Android 10 (API 29) device.

Result: App crashes immediately with NoSuchMethodError in FormView.java:31.

Expected: App should not crash; insets handling should use API-compatible methods for Android 10 and older (e.g., legacy insets APIs / guards by SDK_INT).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions