Qt for Android Automotive Quick Starter Guide
Installing the example from the APK
Qt delivers a pre-built APK as part of the installer package. This APK comes signed with the AOSP (Android Open Source Project) key (this key is for the provided emulator image). Go to Deploy the App below for next steps.
Building the example from source code
The HVAC Control example can be built using the Qt tool chain as outlined below.
Build Prerequisites and Setup
Before you can build the example HVAC application, you need to ensure that the following prerequisites for the development host are met:
- Qt for Android 6.2 is installed as per the Getting Started with Qt for Android Guide.
- You've completed the steps at Installing Qt for Android Automotive.
- Qt Quick Timeline is installed.
- Python 3 is installed (version 3.6 or newer).
- Virtualenv (Since python 3.3, a subset of it has been integrated into the standard library under the venv module.)
Now that the development host setup is complete, we can build the required applications.
Prepare the Qt for Android Automotive IF Back End Generator
The following steps will build and install extensions to Qt IF for Android Automotive.
- Locate the Qt IF source code folder and follow steps at Qt IF Installation. The following steps will build
- Locate the source folder of the Qt for Android Automotive Module
- Create a build folder, e.g.
- Run Qt 6.2 series
qt-configure-modulescript inside the build folder you just created, passing on the path to the Qt for Android Automotive source folder. Make sure to replace path placeholders with the valid paths.
- build and install the Qt for Android Automotive Module (from inside
cmake --build . cmake --install .
Setting up the HVAC Example Project
- Open the project in Qt Creator or Design Studio. It should be in the following file location:
Note: the following step is only required if you are working from a repo source package. Please disregard if you have been provided with binaries.
- Set the build folder location outside the Qt source tree (shadow-build)
- Configure the project settings (Projects mode: Ctrl+5 by default)
- Confirm that the applicable Android Kit is chosen for compilation
- Set the signing of the APK Build > Build Steps > build android APK. See: How to: Signing Android Packages for more information.
- Choose the target , either
jni. This can be quickly selected from the deploy widget, as shown below:
Note: Manually running
CMakefrom the HVAC project's right click context menu, will ensure the templated code is generated before the build.
Deploy the App
Click Run. This will complete the build, open the Emulator, and install the app.
See Interacting with the HVAC Control App to see what it can do.
See also HVAC Control.
Available under certain Qt licenses.
Find out more.