Unsolved How to add custom library to Android application?
I am developing a movile application using Qt 5.14.1 for Android and the application crashes on startup when running the arm64-v8a abi. It works fine if I run the armeabi-v7a abi on the same device, but I need to make it work with the 64 bits version. The error is the following one:
E vndksupport: Could not load vendor/lib64/egl/libGLES_mali.so from sphal namespace: dlopen failed: library "vendor/lib64/egl/libGLES_mali.so" not found.
I think it has to do with the fact that Since Android 7.0 it's not possible anymore to link against a non-ndk shared library (but I don't understand why it works with the armeabi-v7a abi).
Anyway, I have tried different ways to include the libGLES_mali.so library into the apk but I am not able to solve the problem. Anyone can help me?
You can use
ANDROID_EXTRA_LIBSvariable in .pro file to link additional libraries. It works for all architectures.
@sierdzio I've already done it and the library is included into the libs folder of the android build, but not into the apk.
No idea then, it works for me (with OpenSSL, protobuf and yaml-cpp libs). Perhaps your AndroidManifest is outdated? Or you replace
ANDROID_EXTRA_LIBSvalue somewhere else (Qt Creator sometimes appends empty call to extra libs in main .pro file)?
OK, now I can add the library into the apk. The problem was that I didn't have the 64 bit version of the library. However, I am still getting the error because the application keeps looking for the library on the "vendor/lib64/egl/" folder. Is there any way to modify this and use the library file I am installing with the apk?
I don't know.