Contruir aplicación con librerias usando soname en Android
-
Hola,
Estoy intentando contruir el .apk incluyendo la librería FreeImage pero en runtime me sale el siguiente error:
E AndroidRuntime: Process: org.qtproject.example.neptuno, PID: 8743
E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: library "libfreeimage.so.3" not found: needed by /data/app/~~P8GTfirfELNEWfAbc7pmAQ==/org.qtproject.example.neptuno-DEd97mtIH9Ec49fCAn8CGg==/lib/arm/libneptuno_armeabi-v7a.so in namespace classloader-namespace
E AndroidRuntime: at java.lang.Runtime.load0(Runtime.java:939)
E AndroidRuntime: at java.lang.System.load(System.java:1628)
E AndroidRuntime: at org.qtproject.qt5.android.QtNative$4.run(QtNative.java:505)
E AndroidRuntime: at org.qtproject.qt5.android.QtThread$2.run(QtThread.java:87)
E AndroidRuntime: at org.qtproject.qt5.android.QtThread$1.run(QtThread.java:61)
E AndroidRuntime: at java.lang.Thread.run(Thread.java:923)Mi paquete .apk tiene la siguiente estructura:
lib/
armeabi-v7a/
- libfreeimage.soI think that the problem is Gradle does not copy .so.X file and my CMake link to libfreeimage.so.3 instead of libfreeimage.so.
Creo que mi problema es que GRadle no copia los ficheros .so.X y el proyecto CMake hace el linkado usando las librerias por medio de su referencia soname libfreeImage.so.3.Mi CMakeLists.txt contiene:
if(ANDROID)
target_link_libraries(neptuno Qt5::Sql Qt5::Quick Qt5::Qml Qt5::Network Qt5::NetworkAuth Qt5::Widgets
/home/gabridc/Repositorio/neptuno-forked/App/Libraries/FreeImage/libfreeimage.so)
endif()I hope could help me because I am looking for information about this issue and I dont find anything.
Espero que podáis ayudarme porque no soy capaz de solucionar el problema ni encontrar nada en internet que me ayude.Gracias de antemano !