Using Qt for Android (July 2017)

From Tuxamito
Revision as of 23:45, 10 July 2017 by Daniel (talk | contribs)
Jump to: navigation, search


Qt libraries and QtCreator

In the website of Qt, download the Qt installer open-source application development. Then go to the directory where it is downloaded, make it executable and run it as root:

chmod 777
sudo ./

When the next window appears then click on skip to continue without registering: Qtinst1.png

Then choose the installation path, the default one is usually a good choice: Qtinst2.png

Make sure that the Tools and a version of the Qt libraries are selected, inside it also select the android packages: Qtinst3.png

Once the installation is finished you can add the qtcreator executable to the system PATH or link into a directory that is already in it:

sudo ln -sf /opt/Qt/Tools/QtCreator/bin/ /usr/local/bin/qtcreator

Android Tools & SDK

To install the android tools follow the next instructions (the recommended version for now is r25.2.5). The first step is to download it and decompress it:

sudo mkdir -p /opt/android
mkdir android-sdk
cd android-sdk
unzip ../

Then execute it to download the rest of the components:

cd tools

Make sure that Android SDK Platform-tools, Android SDK Build-tools and at least one of the Android API are selected:



Then accept the license and after the installation is finish move the Android SDK to an accessible directory.

cd ../..
sudo mv android-sdk/ /opt/android/

The next step is to install the Android NDK. Download it, uncompress it and copy it to the same directory as the SDK with the following commands:

sudo mv android-ndk-r10e /opt/android/android-ndk

Integrate Android Tools in QtCreator

First install the necessary dependencies:

sudo apt-get install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 libsdl1.2debian:i386 libgl1-mesa-dev openjdk-8-jdk