Open qbonnard opened 10 years ago
The real problem with qmake for android is that it expects a regular NDK root. It has its own structure and currently I can't see a feasible way of putting your own libraries there (e.g chilitags.hpp and libchilitags.so compiled for android), or somehow compiling those too on the way with a regular NDK. The solution I can see for now is to build the whole thing with cmake and a standalone toolchain. This can also be extended to build the desktop version. I'm working on this.
This might also mean building and deploying Qt for android inside the standalone NDK toolchain in the long run.
Maybe it can help! http://comments.gmane.org/gmane.comp.lib.qt.user/12309
Deployment of QML plugins on Android seems to be possible with just a bit of hackery: https://groups.google.com/forum/#!topic/android-qt/fiXNLvfefW8 https://groups.google.com/forum/#!msg/android-qt/io2taQQqKK8/Uu9ByZvTXekJ
I just tested building chilitags-demo (without the chilitags QML plugin) using CMake and a standalone toolchain, and then bundling it into an apk with androiddeployqt; it works. In this process, CMake conceptually and practically replaces qmake.
The deployment methods I mentioned above don't work for some reason in Qt 5.3. Thanks to @lorenzolightsndwarf we know that we can get our plugins recognized by the application (on both desktop and android) by deploying them to the official Qt QML module directory. See my answer at http://stackoverflow.com/a/25665503/1525238.
I confirmed that the same method works for desktop too.
Chilitags+QML used to work, but as a monolithic project. Having Chilitags as a separate plugin makes it really easy to create a new application (simply tell in the main.cpp where to look for plugins versus having to configure the build process with Chilitags specific options). The only problem is to tell QMake to copy the Chilitag plugin when deploying an android application, and where to look for it.
This seems like an open question: https://stackoverflow.com/questions/18309061/how-to-deploy-qt5-qml-plugin-to-android http://qt-project.org/forums/viewthread/41619 https://stackoverflow.com/questions/22732537/what-is-the-proper-way-of-deploying-c-qml-plugins-on-mobile-device