Note that generally the source of truth is CI, in this case: https://github.com/mavlink/qgroundcontrol/blob/Stable_V4.4/.github/workflows/android_release.yml
Download Qt for Open Source and install Qt 5.15.2 into ~/Qt
. Make sure Android is included.
For these steps, choose Java 17 (or similar):
sudo apt install openjdk-17-jdk
sudo update-alternatives --config java
Install sdkmanager using Command line tools only to ~/Android
.
Install Android SDK 33:
cd ~/Android
cmdline-tools/latest/bin/sdkmanager "platforms;android-33" "platform-tools" "build-tools;33.0.0"
And NDK:
cmdline-tools/latest/bin/sdkmanager "ndk;21.3.6528147"
cd your-qgc-repo
wget https://gstreamer.freedesktop.org/data/pkg/android/1.18.6/gstreamer-1.0-android-universal-1.18.6.tar.xz
mkdir gstreamer-1.0-android-universal-1.18.6
tar xf gstreamer-1.0-android-universal-1.18.6.tar.xz -C gstreamer-1.0-android-universal-1.18.6
For this step, switch to Java 11
sudo apt install openjdk-11-jdk
sudo update-alternatives --config java
Set Android SDK and NDK environment variables:
export ANDROID_SDK_ROOT=~/Android/
export ANDROID_NDK_ROOT=~/Android/ndk/21.3.6528147
Configure:
cd your-qgc-repo
mkdir -p build-android-arm64-qt5 && (cd build-android-arm64-qt5 && ~/Qt/5.15.2/android/bin/qmake -r ../qgroundcontrol.pro -spec android-clang CONFIG+=DailyBuild CONFIG+=installer ANDROID_ABIS="arm64-v8a")
And build:
(cd build-android-arm64-qt5 && make -j$(nproc))