Qt 6.11 is out! See what's new in the release
blog
open ssl for anroid - libcripto.so and libssl.so
-
Qt Creator 19.0.2, Qt 6.11.1
There is error while deploying:E/linker ( 3025): library "/system/lib/libcrypto.so" ("/system/lib/libcrypto.so") needed or dlopened by "/data/app/org.qtproject.example.MyApp-b285bi3dg0ygDJiKbup0CA==/lib/arm/libQt6Core_armeabi-v7a.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/data/app/org.qtproject.example.MyApp-b285bi3dg0ygDJiKbup0CA==/lib/arm:/data/app/org.qtproject.example.MyApp-b285bi3dg0ygDJiKbup0CA==/base.apk!/lib/armeabi-v7a", permitted_paths="/data:/mnt/expand:/data/data/org.qtproject.example.MyApp"]As its written in https://doc.qt.io/qt-6.11/android-openssl-support.html, I put in CMakeList.txt
if (ANDROID) include(FetchContent) FetchContent_Declare( android_openssl DOWNLOAD_EXTRACT_TIMESTAMP true URL https://github.com/KDAB/android_openssl/archive/refs/heads/master.zip ) FetchContent_MakeAvailable(android_openssl) include(${android_openssl_SOURCE_DIR}/android_openssl.cmake) endif()and
if (ANDROID) add_android_openssl_libraries(MyApp) endif()command created folder
~/cpp/MyApp/MyApp/build/Qt_6_11_1_for_Android_armeabi_v7a-Debug/_depswith android_openssl-build, android_openssl-src and android_openssl-subbuild.
However, the error still remains, despite the fact that in the apk file~/cpp/MyApp/MyApp/build/Qt_6_11_1_for_Android_armeabi_v7a-Debug/android-build-MyApp/build/outputs/apk/debug/android-build-MyApp-debug.apkcontains files
/lib/armeabi-v7a/libcripto.soand
/lib/armeabi-v7a/libssl.soI searched the net, GPT-5 @ duck.ai says that command
for f in $(unzip -Z1 android-build-MyApp-debug.apk | grep "lib/armeabi-v7a/"); do unzip -p android-build-MyApp-debug.apk $f > /tmp/$$.so; echo "== $f =="; readelf -d /tmp/$$.so | grep NEEDED || true; donemust show libcripto.so in section
== lib/armeabi-v7a/libplugins_tls_qopensslbackend_armeabi-v7a.so == 0x00000001 (NEEDED) Совм. исп. библиотека: [libQt6Network_armeabi-v7a.so] 0x00000001 (NEEDED) Совм. исп. библиотека: [libQt6Core_armeabi-v7a.so] 0x00000001 (NEEDED) Совм. исп. библиотека: [liblog.so] 0x00000001 (NEEDED) Совм. исп. библиотека: [libm.so] 0x00000001 (NEEDED) Совм. исп. библиотека: [libc++_shared.so] 0x00000001 (NEEDED) Совм. исп. библиотека: [libdl.so] 0x00000001 (NEEDED) Совм. исп. библиотека: [libc.so]same as it does in
== lib/armeabi-v7a/libssl.so == 0x00000001 (NEEDED) Совм. исп. библиотека: [libcrypto.so] 0x00000001 (NEEDED) Совм. исп. библиотека: [libdl.so] 0x00000001 (NEEDED) Совм. исп. библиотека: [libc.so]Any suggestions?
-
Hi,
Something seems off. The error message suggests that the library are looked for in the system folders rather than your apk.
Am I correct ?