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) How to move dependency to apk
Qt 6.11 is out! See what's new in the release blog

(Android) How to move dependency to apk

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 4 Posters 780 Views 1 Watching
  • 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.
  • C Offline
    C Offline
    Creaperdown
    wrote on last edited by
    #1

    I want to move 2 libraries of a dependency that my application is using to the lib/ folder of the apk.

    More detailed: When building a dependency from source, I get 4 files:

    • libmupdf.so
    • libmupdf.so.24.0
    • libmupdfcpp.so
    • libmupdfcpp.so.24.0

    Where libmupdf.so is a link to libmupdf.so.24.0 (the same goes for libmupdfcpp.so and libmupdfcpp.so.24.0). Qt automatically moves libmupdf.so and libmupdfcpp.so to the apk, but when starting my application, I get the error java.lang.UnsatisfiedLinkError: dlopen failed: library "libmupdfcpp.so.24.0" not found because the sonames (libmupdfcpp.so.24.0 and libmupdf.so.24.0) aren't moved to the lib/ folder of the apk, thus the links are broken.

    So I am trying to find a solution for moving those libraries to the apk's lib/ folder.
    I have tried QT_ANDROID_EXTRA_LIBS, but there seems to be a rule that says that the libraries need to start with lib and end with .so, thus it fails since my libraries end with 24.0.

    Does someone have an idea how I could fix that?

    1 Reply Last reply
    0
    • I Offline
      I Offline
      Isabel Harrison
      wrote on last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • S Offline
        S Offline
        SilviaCummings
        wrote on last edited by
        #3
        This post is deleted!
        JoeCFDJ 1 Reply Last reply
        0
        • S SilviaCummings

          This post is deleted!

          JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by
          #4

          @SilviaCummings are these libs built for Android? if not, you can not move them into apk. I guess you have to find android build of the libs and pack them in your build file. Or you build them for Android from their sources.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SilviaCummings
            wrote on last edited by
            #5
            This post is deleted!
            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