Can’t deploy FMX application to my old Android device

  

It’s the first time that I’m trying to make a FireMonkey application, as well as cross compiling to Android. I use the default Android SDK that comes with Delphi 10.4.
The application is pretty simple and it works well on Windows.
My plan is to try to deploy it to my Google Nexus 7 2013 (see here for the specification). When I choose Nexus 7 as the target and click the Run button, I got this error:
[DCC Error] E2597 c:\program files (x86)\embarcadero\studio\21.0\lib\Android\debug\SysInit.o: error adding symbols: File in wrong format
[DCC Fatal Error] F2588 Linker error code: 1 ($00000001)

What’s the problem here? Since I have Android 6 on my tablet, is it too old?
Here is my code:
UNIT Unit1;

INTERFACE

USES
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Memo.Types, FMX.ScrollBox, FMX.Memo, FMX.StdCtrls,
FMX.Controls.Presentation, FMX.Edit;

TYPE
TForm1 = CLASS(TForm)
Edit1: TEdit;
Button1: TButton;
Memo1: TMemo;
StyleBook1: TStyleBook;
StyleBook2: TStyleBook;
PROCEDURE Button1Click(Sender: TObject);
PROCEDURE FormCreate(Sender: TObject);
PROCEDURE Edit1KeyDown(Sender: TObject; VAR Key: Word; VAR KeyChar: Char; Shift: TShiftState);
PRIVATE
PROCEDURE add_to_memo;
{ Private declarations }
PUBLIC
{ Public declarations }
END;

VAR
Form1: TForm1;

IMPLEMENTATION

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

PROCEDURE TForm1.Button1Click(Sender: TObject);
BEGIN
add_to_memo;
END;

PROCEDURE TForm1.Edit1KeyDown(Sender: TObject; VAR Key: Word; VAR KeyChar: Char; Shift: TShiftState);
BEGIN

IF Key = vkReturn THEN
add_to_memo;
END;

PROCEDURE TForm1.add_to_memo;
BEGIN
IF Edit1.Text <> ” THEN
BEGIN
Memo1.Lines.add(Edit1.Text);
Edit1.Text := ”;
Edit1.SetFocus;
END
ELSE
BEGIN
Edit1.SetFocus;
END;
END;

PROCEDURE TForm1.FormCreate(Sender: TObject);
BEGIN
Edit1.SetFocus;
self.StyleBook := StyleBook1;
END;

END.

Below are some snapshots in case you need more information.

Comments are closed.