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. How to add custom library to Android application?
QtWS25 Last Chance

How to add custom library to Android application?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 2 Posters 1.3k 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.
  • P Offline
    P Offline
    Pablez
    wrote on last edited by
    #1

    Hi,

    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?

    Thanks,

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You can use ANDROID_EXTRA_LIBS variable in .pro file to link additional libraries. It works for all architectures.

      (Z(:^

      P 1 Reply Last reply
      2
      • sierdzioS sierdzio

        You can use ANDROID_EXTRA_LIBS variable in .pro file to link additional libraries. It works for all architectures.

        P Offline
        P Offline
        Pablez
        wrote on last edited by
        #3

        @sierdzio I've already done it and the library is included into the libs folder of the android build, but not into the apk.

        1 Reply Last reply
        1
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          No idea then, it works for me (with OpenSSL, protobuf and yaml-cpp libs). Perhaps your AndroidManifest is outdated? Or you replace ANDROID_EXTRA_LIBS value somewhere else (Qt Creator sometimes appends empty call to extra libs in main .pro file)?

          (Z(:^

          1 Reply Last reply
          0
          • P Offline
            P Offline
            Pablez
            wrote on last edited by
            #5

            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?

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              I don't know.

              (Z(:^

              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