devbean / QtCipherSqlitePlugin

A Qt plugin for cipher SQLite.
http://qtciphersqliteplugin.galaxyworld.org
GNU Lesser General Public License v2.1
392 stars 159 forks source link

[Android] It is possible to build as a lib? #12

Closed DisableAsync closed 6 years ago

DisableAsync commented 7 years ago

Actually, I should say this: "How to use the library if i build it as a lib on android?"

DisableAsync commented 7 years ago

it seems the library isnt ready for usage on android at all? I tried several ways to build&use it on android, but all failed.

scienceasdf commented 6 years ago

I succeed in building it with Android. Use the android toolkit, build it with qmake and you will get .so file. Copy the file into the plugin folder, and connection to a database is really easy.

DisableAsync commented 6 years ago

could you give me same details about the building procedure? im not that familiar with android development.

scienceasdf commented 6 years ago

You need to open the .pro file with Qt Creator. Then use your kits for Android building( if you have configured your Android kits). And just in release mode( in debug mode the .so file will be of no use) click the build icon( not the run icon), you will get a .so library in your build path in the android_build/libs folder. So your will find libsqlitecipher.so in this folder, and copy that to your Qt for Android plugin folder, then you can use it with no difference with the desktop plugin. And I wanna know that if you are Chinese?

DisableAsync commented 6 years ago

sorry for the late reply. i have been busy these weeks.

actually i tried the method you explained, if i did it correctly? Qt just won't pack the .so file into apk or maybe this is not the "Qt for Android plugin folder" you said: Qt\Qt5.10.0\5.10.0\android_armv7\plugins\sqldrivers

for the question you asked: yes, im chinese, why? did i use some stupid english?

DisableAsync commented 6 years ago

oops, stupid i finally found the problem. everytime i tried to build for android, i modified the .pro file to build it as a "lib", but not an "App" so the .so file i got is totally wrong.

thanks for the promotion.