[Android-development] Building Android Packages from the Terminal
Vyacheslav Blinov
blinov.vyacheslav at gmail.com
Mon May 6 09:04:39 CEST 2013
01.05.2013 10:36, Nathan Osman пишет:
> Hi Everyone,
>
> I just finished installing and compiling Qt5 for Android on one of my
> servers. (And of course I have the Android SDK and NDK installed on
> the server as well.) I followed the instructions on the Qt5 wiki and
> the process was relatively straightforward.
>
> However, I would also like to compile Qt5 applications for Android
> directly on the server. I have no idea how to go about doing this
> since the instructions in the Qt wiki are designed for Qt Creator.
>
> In particular, what steps would I need to take for a CMake-based
> project? Any advice or a push in the right direction would be appreciated.
>
> - Nathan
>
>
> _______________________________________________
> Android-development mailing list
> Android-development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/android-development
Hi Nathan. First of all you'll need proper cmake toolchain file for
android. The one from https://code.google.com/p/android-cmake/ works for
me. You might find yourself tuning this toolchain a little bit, so it
works perfectly for you (for example I turned off some restrictions
about there to search libraries for).
Next thing to do is just to create CMakeLists.txt as usual, that will
produce your shared library. To link with Qt for android in CMake, you
can use find module for Qt, as usual.
Then run android project update and build android application with ant,
using this library. I invoke android update and ant directly from cmake,
to don't mix this up and configure all required steps from one place.
If you interested in my changes on android toolchain and android
application building process you can take a look at
https://github.com/unisontech/cmake, speciffically on
https://github.com/unisontech/cmake/blob/master/toolchain/android.cmake
More information about the Android-development
mailing list