Specify HarmonyOS deploy settings
A HarmonyOS device runs an application from a signed HarmonyOS Ability Package (.hap), so deploying means building one. Go to Projects > Deploy Settings to see the steps of Deploy to HarmonyOS device:
- Build HarmonyOS package (.hap) collects what the application needs. It runs
harmonydeployqtto stage the Qt libraries, the QML imports and the plugins, adds the libraries the staged ones need in turn, and generates the hvigor project. - Package HarmonyOS application with hvigor turns that project into an unsigned package.
- Sign HarmonyOS package signs it with
hap-sign-tool.jarand the material from Preferences > SDKs > HarmonyOS. - Install HarmonyOS package with hdc installs it on the device.
Turn off Run without installing in Preferences > SDKs > HarmonyOS to always reinstall, which is what a changed package needs.
Libraries the device does not have
Qt links against ICU, fontconfig, freetype, and libpng, but a HarmonyOS device carries none of them. Set Additional packages to the prefix they are installed under, and the kit passes it to the build as QT_ADDITIONAL_PACKAGES_PREFIX_PATH, which adds them to the package. When one is missing anyway, Qt Creator reports which staged library needs it.
What the application is called on the device
A provisioning profile is issued for one bundle name, and a device installs a package only under that name. Qt Creator therefore uses the name from the profile rather than the one in the project, and reports it when the two differ.
See also How to: Build and Run, How to: Develop for HarmonyOS, Developing for HarmonyOS devices, Sign HarmonyOS packages, and Run on HarmonyOS devices.
Copyright © The Qt Company Ltd. and other contributors. 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.