Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
DisableAsync opened this issue Oct 18, 2017 · 7 comments
Closed

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

DisableAsync opened this issue Oct 18, 2017 · 7 comments

Comments

@DisableAsync
Copy link

No description provided.

@DisableAsync
Copy link
Author

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

@DisableAsync
Copy link
Author

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
Copy link

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
Copy link
Author

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

@scienceasdf
Copy link

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
Copy link
Author

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants