Qt for Android Automotive Quick Starter Guide
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.
The HVAC example can be built using the Qt tool chain as outlined below.
Before you can build the example HVAC application, you need to ensure that the following prerequisites for the Windows development host are met:
- Qt for Android 5.15 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.
- Pipis installed.(Starting with python 3.4 this should be included by default with the python binary installers)
- 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.
The following steps will build and install extensions to Qt IVI for Android Automotive.
- Locate the Qt IVI source code folder and follow steps at Qt IVI 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 5.15 series
qmakeinside the build folder you just created, passing ut the path to the Qt for Android Automotive source folder. Make sure to replace
<path_to_qtaa_module>with the path to the source folder you located earlier.
- build and install the tqtc-android-automotive (from inside
make -j8 make install
- 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 ABI in Build settings Build > Build Steps > qmake e.g. x86
- 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
qmakefrom the HVAC project's right click context menu, will ensure the templated code is generated before the build.
Click Run. This will complete the build, open the Emulator, and install the app.
See Interacting with the HVAC Example App to see what it can do.
See also HVAC Example.
Available under certain Qt licenses.
Find out more.