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. QSqlDatabase : Driver not loaded Driver not loaded
QtWS25 Last Chance

QSqlDatabase : Driver not loaded Driver not loaded

Scheduled Pinned Locked Moved Solved Mobile and Embedded
qsqldatabasedriver not loadandroidandroid studio
4 Posts 2 Posters 2.2k 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
    Sanders
    wrote on 28 Jul 2016, 13:03 last edited by
    #1

    Hi developer, I developed a c++ library using qt. In this one I am using QSqlDatabase to query informations from a SQLite database. Notice : my library works fine in a qt desktop application (I am developing on Linux).

    Now my next step is to use my libray in an android studio project. For this I compiled my library using the android ndk (this step works fine) but got QSqlDatabase : Driver not loaded Driver not loaded.

    This error occurs when I am calling m_database.setDatabaseName(<path>/Database.db);

    Thank for your feedback

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 28 Jul 2016, 21:53 last edited by
      #2

      Hi,

      Did you check that you have the driver for the Android built ? Are you deploying it with your application ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sanders
        wrote on 30 Jul 2016, 13:51 last edited by
        #3

        I finally resolved my problem. Qt did not found the driver in the tree folder of the apk (once deployed on a device)

        Have a look on this post : http://stackoverflow.com/questions/31607280/qt-c-library-in-android-eclipse-project-qsqlite-driver-not-loaded

        1 Reply Last reply
        1
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 30 Jul 2016, 15:30 last edited by
          #4

          Glad you found out and thanks for sharing !

          Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          3/4

          30 Jul 2016, 13:51

          • Login

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