Search code examples
androiddelphifiremonkey

"E2597 SysInit.o: error adding symbols: File in wrong format" when compiling a 32-bit Android app


I get this error when trying to compile a 32-bit Android application:

[DCC Error] E2597 c:\program files (x86)\embarcadero\studio\21.0\lib\Android\debug\SysInit.o: error adding symbols: File in wrong format

When compiling for 64-bit, there is no problem.

I have tried reinstalling the Android platform, and using a different SDK version, but the issue is the same.

How do I resolve this?


Solution

  • I got this error in Delphi 11, to fix it access the tab NDK in Android SDK 32bits (SDK Manager), then modify the path for: arm-linux-androideabi-id.exe arm-linux-androideabi-strip.exe gdbserver location C++ Builder NDK library path Delphi NDK library path.

    In my computer is like this:

    arm-linux-androideabi-id.exe C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.44500.8973\android-ndk-r21\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.exe

    arm-linux-androideabi-strip.exe C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.44500.8973\android-ndk-r21\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-strip.exe

    gdbserver location C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.44500.8973\android-ndk-r21\prebuilt\android-arm\gdbserver\gdbserver

    C++ Builder NDK library path C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.44500.8973\android-ndk-r21\platforms\android-23\arch-arm\usr\lib

    Delphi NDK library path. C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.44500.8973\android-ndk-r21\sources\cxx-stl\llvm-libc++\libs\armeabi-v7a;C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.44500.8973\android-ndk-r21\platforms\android-23\arch-arm\usr\lib

    This should be different depending on the version and how the installation was performed.