QSqlDatabase : Driver not loaded Driver not loaded
-
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
-
Hi,
Did you check that you have the driver for the Android built ? Are you deploying it with your application ?
-
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
-
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 :)