What should I do to deploy run Qt SQL (PostgreSQL) application on android ?
-
I have an application via which user can view tables in database via Network . It Works on my Arch Linux . But then I compiled it for android and I get :-
W/libFlatSystem.so(28674): (null):0 ((null)): QSqlDatabase: QPSQL driver not loaded W/libFlatSystem.so(28674): (null):0 ((null)): QSqlDatabase: available drivers: QSQLITE
So postgreSQL driver is not available on my android system . But I have installed PostgreSQL via temux and PostgreSQL is working fine in temux,Also
I have no intention to use Progresql installed in temux . My application connects to server and and fetch data from server .
So what thing I need to consider ?
Do I need to bunndle Postgresql with my Qt app ?
or Qt provides some handy way ?this is my first android Qt Project and I am very new to SQL world
-
Hi,
You would have to cross-compile the PostgreSQL client libraries for Android and then build the corresponding Qt plugin.
One thing you can try is to check with the termux folks whether you could re-use their client libraries build.
-
As u told me I had successfully compiled postgresql (since last 12 hours ) and I have put libpsql.so in /opt/Qt/5.11.1/android_armv7/plugins/sqldrivers
% file *
libpq.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /system/bin/linker, with debug_info, not stripped
libqsqlite.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /system/bin/linker, not strippedbut still I am getting same error .
-
Did you build the corresponding Qt plugin ?
-
Not the whole of Qt, just the corresponding plugin.