export ANDROID_ROOT=/home/da/crosscompile
export ANDROID_STUDIO=/home/da/crosscompile/android/studio
export ANDROID_SDK=/home/da/crosscompile/android/sdk
export ANDROID_NDK=/home/da/crosscompile/android/ndk
export ANDROID_JDK=/home/da/crosscompile/android/jdk
Install prerequests
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
sudo apt-get install libgcc1:i386 zlib1g:i386
sudo apt-get install libsdl1.2debian:i386
Download android studio from official site
wget https://dl.google.com/dl/android/studio/ide-zips/3.0.1.0/android-studio-ide-171.4443003-linux.zip
Unzip and move it to android studio path
unzip android-studio-ide-171.4443003-linux.zip -d $ANDROID_ROOT
Get in to studio directory and run it
cd $ANDROID_STUDIO/bin
./studio.sh
Go to Configure > SDK Manager > SDK Platforms
Change the Android SDK Location
path to $ANDROID_SDK, in my case the path should change to /home/da/crosscompile/android/sdk
Choose the desired platforms and press Apply to install it.
Download the recommended version 10e from the official site
wget https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip
Unzip and move it to android ndk path
unzip android-ndk-r10e-linux-x86_64.zip
sudo mv android-ndk-r10e $ANDROID_NDK
Download JDK 8 from the official site unzip and move it to android jdk path
tar -zxvf jdk-8u161-linux-x64.tar.gz
sudo mv jjdk1.8.0_161 $ANDROID_JDK
Donwload Qt 5.9.4
wget http://download.qt.io/official_releases/qt/5.9/5.9.4/qt-opensource-linux-x64-5.9.4.run
chmod +x ./qt-opensource-linux-x64-5.9.4.run
./qt-opensource-linux-x64-5.9.4.run
The Qt Creator IDE that came with the Qt 5 installation on your development host, must be configured to enable developing
applications for Android. Launch Qt Creator and select Tools > Options > Devices > Android
to add the Android NDK and SDK paths and the JDK path