.a: error adding symbols: File in wrong format
Hello All,
I am new to Android Studio and have following question:
I have included few external pre-build libraries from a vendor that have an ending in ". a".
Even though the project builds OK using the CMake, I get following error when I try to run the app on my tablet.
"Build command failed.
Error while executing process C:\Users\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {--build C:\app\.cxx\cmake\arm7Debug\arm64-v8a --target hello-jni}
[1/2] Building C object CMakeFiles/hello-jni.dir/hello-jni.c.o
[2/2] Linking C shared library C:\Software\app\build\intermediates\cmake\arm7Debug\obj\arm64-v8a\libhello-jni.so
FAILED: cmd.exe /C "cd . && C:\Users\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=aarch64-none-linux-android23 --gcc-toolchain=C:/Users/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -Wl,-z,noexecstack -shared -Wl,-soname,libhello-jni.so -o C:\app\build\intermediates\cmake\arm7Debug\obj\arm64-v8a\libhello-jni.so CMakeFiles/hello-jni.dir/hello-jni.c.o C:/Software/MDP11_Demo_BLE/app/src/main/cpp/prebuilt_libs/libiaq.a C:/Software/MDP11_Demo_BLE/app/src/main/cpp/prebuilt_libs/libtvoc.a C:/app/src/main/cpp/prebuilt_libs/libr_cda.a C:/Software/MDP11_Demo_BLE/app/src/main/cpp/prebuilt_libs/libeco2.a C:/Software/MDP11_Demo_BLE/app/src/main/cpp/prebuilt_libs/libodor.a C:/Software/MDP11_Demo_BLE/app/src/main/cpp/prebuilt_libs/libzmod4410_calibration_co.a -landroid -llog -latomic -lm && cd ."
C:/app/src/main/cpp/prebuilt_libs/libiaq.a: error adding symbols: File in wrong format
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed."
I am really stuck and any help is greatly appreciated.
Thank you,
Admir