Search code examples
androiddelphifiremonkeydelphi-10.3-rio

My Basic Android App closes after splashscreen


I have created a basic Android64 app, with just one button and managed to build it. After installing it on my device (sideloaded), I see the app in the startmenu but once I start it it shows a splashscreen and then closes. I never get to see the button...

unit MainUnit;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
  FMX.Controls.Presentation, FMX.StdCtrls;

type
  TMain = class(TForm)
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Main: TMain;

implementation

{$R *.fmx}
{$R *.LgXhdpiPh.fmx ANDROID}

procedure TMain.FormCreate(Sender: TObject);
begin

end;

end.

What's wrong here? :-/

PS: I have noticed, that the form is not set to visible by default, and changed that (but no change). Is there a reason to it?

PS: Update 13042021: I found out this only happens on my OnePlus 8 Pro, but not on my Samsung S9. Weird!


Solution

  • Android apps compiled with Delphi 10.3 may not run correctly on Android 10 and later due to a known issue on the IDE precompiled binaries. If it's the case -and I'm assuming this based on the symptoms described and the Android OS version your phones may be potentially running- you will find detailed instructions to patch your RAD Studio installation on the Embarcadero Quality Portal (link). You may need to create a free Embarcadero account to access the site if you don't have one yet.