2

I am trying to build a mobile application for Android 64 bit. It works fine for 32 bit, but when trying it for 64 I get this error:

[DCC Error] E2597 C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidNDK-21-21.0.40680.4203\android-ndk-r21\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.exe: error: c:\program files (x86)\embarcadero\studio\21.0\lib\Android64\Release\SysInit.o: incompatible target

I get the same error for a few hundred of the .o-files in that directory.

I tried using cleanup and updating the SDK with the SDK Manager manually, but to no avail. This error also occurs when creating a new project.

What can I do fix this? Is there an easy way to do this?

  • 1
    Does this error also happen in new project. Based on error it seems as if you are trying to build your application using 32 bit compiler and 64 bit .s files or vice versa. The cause for this might lie in wrong setup of Android SDK or wrong configuration of Delphi – SilverWarior Jul 15 '21 at 12:36
  • Yes, I get the same error when creating a brand new project. How can I fix the configuration? – Nils Eilers Jul 15 '21 at 12:37
  • 2
    Thank you very much, that solved it!If you post that as an answer, I will accept is as the solution to my question. – Nils Eilers Jul 15 '21 at 16:36

1 Answers1

4

Try removing Android platform from Delphi using Tools -> Manage Platforms and then removing any leftover data from Android SDK manually. Then restart computer and add Android platform to Delphi using Tools -> Manage Platforms.

This should then download, install and configure all necessary Android SDK's that are required by Delphi for Android deployment

SilverWarior
  • 7,372
  • 2
  • 16
  • 22
  • When you convert a comment into an answer, you should delete the comment to remove the no-longer relevant clutter. It also helps get votes on your answer rather than just your comment. – Ken White Jul 16 '21 at 20:05