Home > Back-end >  Delphi 11.0 FMX Android application won't start on Nox Android 7.1 Emulator SDK 25.2.5 32-bit
Delphi 11.0 FMX Android application won't start on Nox Android 7.1 Emulator SDK 25.2.5 32-bit

Time:07-30

I am writing a simple Android application that contains only a TButton for testing compilation. The target is a Nox Android 7.1 emulator that is detected as a build target by the Delphi 11.0 IDE. I am able to build and sideload the application onto the Android 7.1 emulator. After starting, the FireMonkey splash screen displays and the application closes with the error "TestApp keeps stopping.". I am unsure why the app will not start. The Android 32-bit SDK 25.2.5 is used.

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
  TForm2 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.fmx}

procedure TForm2.Button1Click(Sender: TObject);
begin
  Button1.Text := 'Clicked';
end;

end.

I was reading that Delphi 11.0 compiles FMX for ARM processors, but I had thought the Nox Android emulator would work around this problem.

program TestApp;

uses
  System.StartUpCopy,
  FMX.Forms,
  MainUnit in 'MainUnit.pas' {Form2};

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm2, Form2);
  Application.Run;
end.

CodePudding user response:

I'm using Nox 7.0.3.2, with Android 7.1.2 64Bit (!). But the Delphi app is working only, if it is compiled for a 32Bit Android target. If your project was created from Delphi 10.x originally, then you have to revert the libraries in the project tree to System default (Target Platform / Android 32 / Libraries -> right click).

PS: The ADB-Path in the Delphi-SDK-settings should point to Nox like, "C:\Program Files (x86)\Nox\bin\adb.exe"

  • Related