Getting Started with Qt for Android _ Qt 6.7
Getting Started with Qt for Android _ Qt 6.7
Search Topics
https://doc.qt.io/qt-6/android-getting-started.html 1/5
19/09/2024, 18:45 Getting Started with Qt for Android | Qt 6.7
To learn the basics of getting started with Qt for Android, take the Getting Started with Qt for Android course in Qt
Academy.
The rest of this page has more detailed getting started information.
To download and install Qt for Android, follow the instructions on the Getting Started with Qt page.
The easiest way to manage these dependencies is by using Qt Creator's built in Android development setup. For
more information, see Qt Creator: Specifying Android Device Settings.
If you prefer to manually install the prerequisites please follow these next steps.
Qt for Android development requires JDK 17 or above, provided by any of the following supported distributions:
Adoptium
OpenJDK
Java SE Development Kit
https://doc.qt.io/qt-6/android-getting-started.html 2/5
19/09/2024, 18:45 Getting Started with Qt for Android | Qt 6.7
Install your preferred JDK. If your installer doesn't set the JAVA_HOME environment variable that points to the
location of the installed JDK, you can set it manually. For example on Linux:
sudo apt-get install openjdk-17-jdk
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
Or on macOS:
brew install openjdk@17
sudo ln -sfn "$(brew --prefix openjdk@17)/libexec/openjdk.jdk" \
"/Library/Java/JavaVirtualMachines/openjdk-17.jdk"
export JAVA_HOME="$(/usr/libexec/java_home -v 17)"
Download the latest version of the Android SDK Command Line Tools for your operating system and extract it to the
appropriate path as stated below.
The Android SDK is commonly installed by Qt Creator or Android Studio in the following locations:
Linux: ~/Android/Sdk/
macOS: ~/Library/Android/sdk/
Windows: C:\Users\<USER>\AppData\Local\Android\Sdk\
brew install android-commandlinetool
Make sure to install the SDK Platform, Platform Tools, and Build Tools. For Qt 6.7, use:
sdkmanager "platform-tools" "platforms;android-34" "build-tools;34.0.0"
Android NDK
sdkmanager "ndk;26.1.10909125"
Emulator
If you wish to use the Android Emulator, you can install it by running:
sdkmanager "emulator" "patcher;v4"
Windows
The default USB driver on Windows does not allow debugging using Android Debug Bridge (ADB) tool. You must
install the additional USB driver provided by the extras Android SDK package. Install it by running the following:
sdkmanager.bat "extras;google;usb_driver"
Linux
The following dependencies are needed for using tools such as adb or gdb which can be used by Qt Creator:
sudo apt-get install libstdc++6 libncurses5
To run the Android emulator, the following dependencies are also necessary:
Now you can test your development setup by running the examples shipped with the Qt installation. For more
information, see Mobile Examples.
To develop a simple application from scratch, see Qt Creator: Creating a Mobile Application.
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided
herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective
logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.
Contact Us
https://doc.qt.io/qt-6/android-getting-started.html 4/5
19/09/2024, 18:45 Getting Started with Qt for Android | Qt 6.7
Qt Group
Our Story
Brand
News
Careers
Investors
Qt Products
Quality Assurance Products
Licensing
License Agreement
Open Source
Plans and pricing
Download
FAQ
Learn Qt
For Learners
For Students and Teachers
Qt Documentation
Qt Forum
Support & Services
Professional Services
Customer Success
Support Services
Partners
Qt World
© 2024 The Qt Company
Feedback
Qt Group includes The Qt Company Oy and its global subsidiaries and affiliates.
https://doc.qt.io/qt-6/android-getting-started.html 5/5