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. Attempt to deploy on Android fails with "library 'libQt5Sql.so' not found"
Forum Update on Monday, May 27th 2025

Attempt to deploy on Android fails with "library 'libQt5Sql.so' not found"

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 2 Posters 1.0k 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.
  • S Offline
    S Offline
    Stokestack
    wrote on 19 Jun 2019, 05:40 last edited by Stokestack
    #1

    Today I updated the Android environment on my Mac, but I don't know if that's related. It's probably at "r20," although I can't find any such moniker anywhere.

    I'm using Qt 5.12.2 and Qt Creator 4.9.0.

    I'm trying to deploy a simple tutorial app that accompanies a book, and although it builds successfully, an attempt to run it on a phone with Android 8.0.0 fails with:

    E AndroidRuntime: FATAL EXCEPTION: qtMainLoopThread
    E AndroidRuntime: Process: org.qtproject.example.gallery_desktop, PID: 20182
    E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: library "libQt5Sql.so" not found
    E AndroidRuntime: at java.lang.Runtime.load0(Runtime.java:928)
    E AndroidRuntime: at java.lang.System.load(System.java:1621)
    E AndroidRuntime: at org.qtproject.qt5.android.QtNative$4.run(QtNative.java:259)
    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:764)
    

    And ideas? I have almost no Android experience. Thanks for any insight!

    J 1 Reply Last reply 19 Jun 2019, 05:47
    0
    • S Stokestack
      19 Jun 2019, 05:40

      Today I updated the Android environment on my Mac, but I don't know if that's related. It's probably at "r20," although I can't find any such moniker anywhere.

      I'm using Qt 5.12.2 and Qt Creator 4.9.0.

      I'm trying to deploy a simple tutorial app that accompanies a book, and although it builds successfully, an attempt to run it on a phone with Android 8.0.0 fails with:

      E AndroidRuntime: FATAL EXCEPTION: qtMainLoopThread
      E AndroidRuntime: Process: org.qtproject.example.gallery_desktop, PID: 20182
      E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: library "libQt5Sql.so" not found
      E AndroidRuntime: at java.lang.Runtime.load0(Runtime.java:928)
      E AndroidRuntime: at java.lang.System.load(System.java:1621)
      E AndroidRuntime: at org.qtproject.qt5.android.QtNative$4.run(QtNative.java:259)
      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:764)
      

      And ideas? I have almost no Android experience. Thanks for any insight!

      J Offline
      J Offline
      J.Hilk
      Moderators
      wrote on 19 Jun 2019, 05:47 last edited by J.Hilk
      #2

      @Stokestack said in Attempt to deploy on Android fails with "library 'libQt5Sql.so' not found":

      Today I updated the Android environment on my Mac, but I don't know if that's related. It's probably at "r20,"

      Maybe, google does not care overly much about backwards compatibility .

      you can check in your settings
      0_1560923152520_9fbd7477-540a-41fc-9fe4-ef5135948969-image.png
      I'm using - as you can see - 18b And I always follow the - don't fix if it ain't broken - philosophy

      So that ndk is staying for a while ;-)

      Did you do a complete rebuild (clean, qmake, rebuild) after updating?


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      S 1 Reply Last reply 19 Jun 2019, 05:58
      3
      • J J.Hilk
        19 Jun 2019, 05:47

        @Stokestack said in Attempt to deploy on Android fails with "library 'libQt5Sql.so' not found":

        Today I updated the Android environment on my Mac, but I don't know if that's related. It's probably at "r20,"

        Maybe, google does not care overly much about backwards compatibility .

        you can check in your settings
        0_1560923152520_9fbd7477-540a-41fc-9fe4-ef5135948969-image.png
        I'm using - as you can see - 18b And I always follow the - don't fix if it ain't broken - philosophy

        So that ndk is staying for a while ;-)

        Did you do a complete rebuild (clean, qmake, rebuild) after updating?

        S Offline
        S Offline
        Stokestack
        wrote on 19 Jun 2019, 05:58 last edited by
        #3

        @J.Hilk Thanks. I did do a clean but not qmake, and this indeed appears to resolve the problem.

        I find the need to do this perplexing. Why isn't this done as a normal part of the build process?

        J 1 Reply Last reply 19 Jun 2019, 06:03
        1
        • S Stokestack
          19 Jun 2019, 05:58

          @J.Hilk Thanks. I did do a clean but not qmake, and this indeed appears to resolve the problem.

          I find the need to do this perplexing. Why isn't this done as a normal part of the build process?

          J Offline
          J Offline
          J.Hilk
          Moderators
          wrote on 19 Jun 2019, 06:03 last edited by J.Hilk
          #4

          @Stokestack said in Attempt to deploy on Android fails with "library 'libQt5Sql.so' not found":

          Why isn't this done as a normal part of the build process?

          because you normally don't need too.

          It's only needed, when you change stuff inside your *pro file, when you modify your qrc files or, in your case, when you actually change your tool set

          Don't forget to set the topic to solved, if your issue is indeed solved ;-)


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          S 1 Reply Last reply 19 Jun 2019, 06:32
          3
          • J J.Hilk
            19 Jun 2019, 06:03

            @Stokestack said in Attempt to deploy on Android fails with "library 'libQt5Sql.so' not found":

            Why isn't this done as a normal part of the build process?

            because you normally don't need too.

            It's only needed, when you change stuff inside your *pro file, when you modify your qrc files or, in your case, when you actually change your tool set

            Don't forget to set the topic to solved, if your issue is indeed solved ;-)

            S Offline
            S Offline
            Stokestack
            wrote on 19 Jun 2019, 06:32 last edited by
            #5

            @J.Hilk Will do! Thanks again!

            1 Reply Last reply
            0

            4/5

            19 Jun 2019, 06:03

            • Login

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