This is the easiest way to start cross-compiling and developing Qt applications for Android. The explained Docker image will install all dependencies and setup all environment variables automatically. By this, it closely follows the steps explained in the detailed system setup guide:
This image alone contains a working Android SDK, NDK and Qt binaries. The easiest is to access it like this (it will be downloaded the first time you use it):
docker run -ti --rm kdeorg/android-sdk bash
Here one can start developing at ease in an environment welcoming to projects that use cmake, Qt, ECM, etc.
To make it easy to compile applications we put some scripts to get started. They can be triggered like this:
docker run -ti --rm kdeorg/android-sdk /opt/helpers/build-generic <appname>
The following command will compile okular with all its dependencies and output an apk to our /tmp directory.
docker run -ti --rm -v /tmp:/output kdeorg/android-sdk /opt/helpers/build-generic okular