Oct 6, 2025

Building QGroundControl for Android Tablets & Herelink

Building QGroundControl for Android Tablets & Herelink

Learn to build QGroundControl for Android tablets and Herelink devices. Complete guide covering Qt setup, Android SDK configuration, and deployment steps.

QGroundControl’s versatility extends across multiple platforms, with the Android version bringing full ground control capabilities to mobile devices. However, building QGC for Android involves two distinct approaches depending on your target platform.

Aspect

Standard Android Build

Herelink Build

Target Devices

Samsung tablets, Google Pixel phones, standard Android devices

Herelink ground control unit

Qt Framework

Qt 6.x (latest)

Qt 5.x (older, stable)

SDK Tools

Modern Android SDK tools

Older SDK requirements

Features

Cutting-edge features and most recent QGC improvements

Stable, specialized for Herelink hardware

Build Environment

Flexible (Windows, macOS, Linux)

Typically Linux or Windows Subsystem for Linux (WSL)

Use Case

General-purpose drone ground control on consumer devices

Specialized device popular among drone operators

Building for Android Tablets and Phones

Essential Development Environment Setup

Building QGroundControl for standard Android devices requires careful setup of multiple development tools. The foundation consists of Visual Studio for general development, Qt Creator as the primary IDE, and Android Studio for Android-specific tooling. Here are the basic steps we are going to take to get QGC deployed:

  • Install

    • Visual Studio 2022 Community Edition

    • QT & QT Creator

    • Android Studio

  • Clone QGC from Github

  • Configure QT Creator

  • Deploy

Installing Visual Studio

The process begins with installing Visual Studio 2022 Community Edition, focusing specifically on the C++ compiler components that QGroundControl requires. When configuring Visual Studio, ensure you select the “Desktop development with C++” workload, which includes the Windows 11 SDK and other essential components.

The Steps in Summary
  • Install Visual Studio 2022 Community Edition

    • Focus on the C++ compiler components required by QGroundControl

    • Select the "Desktop development with C++" workload

    • Ensure Windows 11 SDK and other essential components are included

Installing Qt

Qt installation deserves particular attention, as QGroundControl’s Android build requires Qt 6.8.3 with specific modules. The installation process is notably time-consuming, often requiring 20-30 minutes depending on your system specifications and internet connection speed. Make sure to select Custom Installation rather than letting it install the default and run as Administrator just to be safe.

During installation, focus on selecting only the necessary components: MinGW 13.1.0 64-bit, Qt Charts for data visualization, Android support for cross-platform compilation, and the Microsoft Visual C++ (MSVC) compiler integration.

The second part is selecting the Build Tools. Here select MinGW 13.1.0 64-bit again, CMake 3.30.5, and Ninja 1.12.1.

The Steps in Summary
  • Install Qt 6.8.3 and Qt Creator

    • Allow 20-30 minutes for installation depending on system specifications and internet connection

    • Select only the necessary components:

      • Qt Charts for data visualization

      • Android support for cross-platform compilation

      • Microsoft Visual C++ (MSVC) compiler integration

      • For Build Tools check the following:

        • MinGW

Android Development Tools Configuration

Android Studio installation provides the Android SDK and Native Development Kit (NDK) required for C++ compilation on Android platforms. The key requirement is NDK 26.1, which provides the C++ libraries necessary for QGroundControl’s native components.

Within Android Studio under Settings>Tools>SDK Manager, navigate to the SDK Tools section and ensure you select “Show Package Details” to access specific NDK versions. Install NDK 26.1 specifically, as this version has been tested with the current QGroundControl build system.

Java Development Kit (JDK) 17 installation completes the Android toolchain. This older JDK version maintains compatibility with QGroundControl’s build requirements, despite newer JDK versions being available.

An often-overlooked requirement is enabling Windows Developer Mode. This setting allows QGroundControl’s build system to download and install GStreamer components automatically. Without developer mode enabled, the build process will fail when attempting to retrieve these essential video streaming libraries.

Cloning QGroundControl

There are two repos with QGroundControl. For this path, we are going to use the MAVLink one. Use the following command to clone the repo into your project.

git clone --recursive -j8

Qt Creator Android Configuration

Qt Creator serves as the primary development environment for QGroundControl builds. Once installed, the first critical step involves configuring Android settings within Qt Creator’s preferences.

Navigate to Edit > Preferences and locate the Android configuration section. Here, you must specify the JDK location pointing to your JDK 17 installation directory. The Android SDK path should automatically detect your Android Studio installation, but verify this points to the correct location.

The NDK configuration requires particular attention. Select NDK 26.1 from the available versions and set it as the default. If Qt Creator doesn’t automatically detect your NDK installation, manually browse to the NDK directory within your Android SDK installation.

OpenSSL installation is handled automatically by Qt Creator, but you may need to manually trigger the download if you encounter red warning indicators in the Android settings panel.

Qt has the habit of throwing pop-ups in your way. Unless it’s a breaking error, just click on through.

Project Configuration and Building

Within Qt Creator, open the CMakeLists.txt file from the cloned QGroundControl directory. This triggers Qt Creator’s project configuration process, including comprehensive indexing of all source files. Budget 30-45 minutes for this initial setup phase, as Qt Creator analyzes the entire codebase and configures build dependencies.

Special Note: Once you open this file up, it will create a new file called CMakeLists.txt.user. If you delete this, it will effectively remove all of your configuration and start you from scratch. This can either be a great escape hatch or delete hours of hard work, so be careful.

Project kit selection focuses on Android ARM64 configurations for modern devices. While Qt Creator may present multiple kit options, prioritize debug configurations for development work, as release builds add complexity without immediate benefit during development. Click [Configure Project] to move the next phase.

The build configuration screen within Qt Creator’s Projects tab deserves careful attention.

Ensure CMake points to the correct installation, typically detected automatically during Qt Creator setup. The CMake generator should be set to Ninja, which handles long path names more effectively than other build systems, particularly important on Windows systems.

If there are any issues, the IDE will tell you where and how the build is failing.

Deployment and Testing

Device deployment requires enabling developer mode on your Android device and establishing USB debugging connections. Modern Android devices will prompt for debugging permission when first connected to your development machine.

Qt Creator’s device selector, located in the bottom-left corner of the interface, should display your connected Android device. If your device doesn’t appear, use the device manager to manually select your connected Android device from the available options.

You can now click on the hammer icon to initiate the build. If it passes then you can click on the green arrow to get it deployed to the device.

The deployment process builds your application, packages it as an APK, and installs it directly on your connected device. Initial builds can take substantial time as Qt Creator compiles all dependencies and creates the final application package. Look for the Current state field to show ‘🟢 Ready to use’.

Troubleshooting QT

When Qt Creator shows errors in the project kits or refuses to configure the project, the issue usually stems from incorrect CMake or build system settings. Start by examining the CMake configuration within your kit settings.

Resetting Kit Configuration

If adjusting these settings doesn't resolve kit errors, a complete kit reset often provides a clean slate. This process removes all custom configurations and forces Qt Creator to rebuild its project understanding from scratch.

The reset procedure requires the following steps:

  1. Close Qt Creator completely, ensuring no background processes remain active

  2. Navigate to the root directory of your QGroundControl repository

  3. Delete the CMakeLists.txt.user file - this file stores all Qt Creator project-specific settings

  4. Re-open Qt Creator and open the project by selecting the CMakeLists.txt file

  5. Qt Creator will prompt you to select kits and configure the project as if opening it for the first time

Building for Herelink

Building QGroundControl for Herelink requires a fundamentally different approach than standard Android builds. Herelink QGC uses Qt 5.x instead of Qt 6.x and maintains its own dedicated GitHub repository with Herelink-specific optimizations.

The build environment also differs significantly. While standard Android builds work reliably on Windows, Herelink builds consistently encounter compatibility issues on Windows Pro systems. The solution is Windows Subsystem for Linux (WSL), which provides a complete Linux environment within Windows and successfully handles the Herelink build process.

The Steps
  • Install WSL (Windows Subsystem for Linux)

  • Install JDK

  • Install Android NDK + SDK

  • Install Make

  • Install QT

Linux Environment Setup

WSL installation is straightforward, requiring only a single PowerShell command:

wsl --install

This command installs Ubuntu by default and provides a complete Linux environment within Windows. After installation, you’ll have access to both Windows and Linux file systems, enabling flexible development workflows.

Development Dependencies Installation

The Linux build process requires several specific versions of development tools. Java Development Kit 11 provides the foundation for Android development within the Linux environment:

sudo apt update
sudo apt install openjdk-11-jdk –y
export JAVA_HOME

We have to use JDK 11 because we will be running an older version of QT.

Android SDK installation differs from the Windows approach, using command-line tools rather than Android Studio. Create the necessary directory structure and download the Linux command-line tools:

mkdir -p $HOME/Android/Sdk/cmdline-tools
cd $HOME/Android/Sdk/cmdline-tools

wget <https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip>
unzip commandlinetools-linux-9477386_latest.zip
mv cmdline-tools latest
rm commandlinetools-linux-9477386_latest.zip

export ANDROID_SDK_ROOT=<path to Android Sdk directory>
export PATH=$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$ANDROID_SDK_ROOT/platform-tools:$PATH
source

With command-line tools installed, you can install specific Android SDK components:

sdkmanager --sdk_root=$ANDROID_SDK_ROOT \\  
	"platform-tools" \\  
	"platforms;android-33" \\  
	"build-tools;33.0.2"
	
sdkmanager --sdk_root=$ANDROID_SDK_ROOT "ndk;21.4.7075529"

Make installation is typically straightforward on Linux systems:

sudo apt update
sudo apt install make

Qt Framework Installation

Qt installation on Linux requires downloading the online installer and installing system dependencies. Make the installer executable and install required system libraries:

chmod +x qt-online-installer-linux-x64-4.10.0.run

sudo apt update
sudo apt install -y libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxkbcommon-x11-0 libx11-6 libx11-xcb1 libxext6 libxrender1 libxrandr2 libxi6 libglib2.0-0 libfreetype6 libfontconfig1 libxcb-cursor0 libxcb-cursor-dev

sudo

The Qt installer launches a graphical interface even within WSL, displaying on your Windows desktop. During installation, ensure you select Qt 5.15.2 (available under archived versions) for Herelink compatibility, along with Android support, Qt Charts, CMake, Ninja, and OpenSSL components. You can uncheck everything else to keep your installation lighter.

Continue on by hitting next and then get ready for another long install period like before. When it’s finished you should receive a pop-up like this:

Herelink Source Code and Dependencies

Herelink QGroundControl uses a separate repository maintained by CubePilot:

git clone --recursive -j8 <https://github.com/CubePilot/qgroundcontrol-herelink.git>
git submodule update --recursive

GStreamer installation provides essential video streaming capabilities:

wget --quiet <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

rm

Build Configuration and Compilation

Environment variables must be properly configured before building:

export JAVA_HOME=<path to jdk11 directory>

export ANDROID_SDK_ROOT=<path to Android Sdk directory>

export ANDROID_NDK_ROOT=<path to NDK 21

The build process creates a dedicated build directory and uses qmake for configuration:

mkdir -p build/android
cd build/android

/<path to Qt>/5.15.2/android/bin/qmake ../.. -spec android-clang CONFIG+=StableBuild CONFIG+=installer ANDROID_ABIS=arm64-v8a

make -j4

The make command with -j4 uses four parallel compilation processes, significantly reducing build time on multi-core systems. Compilation typically takes 15-20 minutes, depending on system specifications.

Herelink Deployment

Herelink deployment requires connecting the device to your build machine and enabling developer mode on the Herelink unit. Make sure you are using a data connector and not just a power one, or the device may fail to be recognized. If clear, the device should appear when running standard Android debugging commands.

Installation uses the standard Android Debug Bridge (ADB) tool:

The APK file location depends on your build configuration, but typically resides in the build/android directory after successful compilation. If everything goes well, you should now have QGC running on your Herelink.

Conclusion

By completing this tutorial, you've learned to build QGroundControl for both standard Android devices and Herelink units, navigating different Qt versions, development environments, and platform-specific requirements. You've tackled real-world challenges from configuring WSL environments to managing NDK versions and troubleshooting build errors, which are essential skills for any mobile UAV developer. You now have the practical skills to deploy, customize, and troubleshoot mobile ground control systems for your drone operations, giving you a solid foundation for your next UAV software project.

Additional Resources

To learn more about drone application development, join the Drone Software Meetup group for monthly tutorials and networking.