C

Qt for Android Automotive Quick Starter Guide

This page lists all the instructions you need to get up an running with Qt for Android Automotive. It uses Qt Creator for automated setup where possible.

The video below demonstrates the process.

Download and installation

Complete the steps on the Installing Qt for Android Automotive page.

Setting up the HVAC Example Project

  1. Open the JNI or QtRO sub project in Qt Creator or Qt Design Studio. They should be in the following file locations:
    path_to_qtaa_sources/examples/hvac_demos/hvac/hvac_jni/CMakeLists.txt
    path_to_qtaa_sources/examples/hvac_demos/hvac/hvac_qtro/CMakeLists.txt
  2. Note: This step is only required if you are working from a repo source package. Please disregard if you have been provided with binaries, or have installed via the Qt Online Installer.

    Set the build folder location outside the Qt source tree (shadow-build).

  3. Configure the project settings (Projects mode: Ctrl+5 by default)
    1. Confirm that the applicable Android Kit for your target device is chosen for compilation.
    2. Set the signing of the APK Build > Build Steps > build android APK. See: How to: Signing Android Packages for more information.

      Note: You must use the same key used to sign the AAOS image of your target. See Creating a Platform Keystore for more information.

    3. Choose the target , either qtro or jni. This can be quickly selected from the deploy widget, as shown below:

    Note: Manually running CMake from the HVAC project's right click context menu, will ensure code that is generated from the templates is generated before the build.

Setting up an Android virtual device in Qt Creator

Build your AOSP image and copy the image into the corresponding location in your Android SDK folder, for example:

path_to_Android_SDK/system-images/android-30/android-automotive/x86_64

Follow the steps outlined in creating a new AVD (Android Virtual Device) in the Qt Creator manual. Then, start your AVD to check that it has been configured correctly.

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.