简体   繁体   中英

Creating Android Library using 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 ...)?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM