Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Android Library using QT

Tags:

android

qt

I tried searching for a solution but the only answers i found were the other way around (using the AAR inside QT).

I am developing an android app inside QT creator. All is working fine. Now i need to make the core of this app as a library that can be distributed to android developer to be used in their code (like an AAR). Is that possible to be done? If so, how to do it and how to import it in other development tools (android studio/ eclipse ...)?

like image 628
EYakoumi Avatar asked May 11 '17 09:05

EYakoumi


1 Answers

The easiest way is to compile your library using QtCreator and then send people the generated .so file with the header files. Then people can link with the .so file and use the header files to call the functions or instantiate the classes packaged in it.

Check this link to see how to build a library with QtCreator: https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application

Note that you'll need to compile both armv7 and x86 targets and send both .so files if those two targets are needed.

like image 169
jpo38 Avatar answered Sep 20 '22 19:09

jpo38