Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android package include soname libraries
Forum Updated to NodeBB v4.3 + New Features

Android package include soname libraries

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 335 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gabriidc
    wrote on last edited by
    #1

    Hi,

    I am trying to build a .apk package including freeImage librarie but I have this issue:

    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)

    This problem is in runtime my apk has this structure:

    lib/
    armeabi-v7a/
    - libfreeimage.so

    I think that the problem is Gradle does not copy .so.X file and my CMake link to libfreeimage.so.3 instead of libfreeimage.so.

    My CMakeLists.txt contains:

    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.

    Thank you !!

    1 Reply Last reply
    0
    • IntruderExcluderI Offline
      IntruderExcluderI Offline
      IntruderExcluder
      wrote on last edited by
      #2

      Unfortunately Android does not support library versioning, so you cannot use libfreeimage.so.3 as extra library. You should link your program directly with libfreeimage.so and copy it 'into apk'. If this isn't possible, then you may try to use static library.

      G 1 Reply Last reply
      0
      • IntruderExcluderI IntruderExcluder

        Unfortunately Android does not support library versioning, so you cannot use libfreeimage.so.3 as extra library. You should link your program directly with libfreeimage.so and copy it 'into apk'. If this isn't possible, then you may try to use static library.

        G Offline
        G Offline
        Gabriidc
        wrote on last edited by
        #3

        @IntruderExcluder thank you so much ! I will follow your advices.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved