配置 HarmonyOS SDK
- 访问Preferences >SDKs >HarmonyOS 。
- 在“HarmonyOS SDK location ”中,输入包含
sdk和bin目录的目录路径,或选择“Auto-detect ”以在常用位置中查找。字段下方的标签会显示搜索结果。 - 在“Additional packages ”中,输入为 HarmonyOS 构建的第三方库的安装前缀,即其
lib所在的目录。Qt Creator 会将其作为QT_ADDITIONAL_PACKAGES_PREFIX_PATH传递给构建过程,从而将库添加到包中。如果没有这些库,应用程序虽然可以安装和启动,但无法加载平台插件。 - 请保持“Create kits automatically ”选项勾选,以便“Qt Creator ”为它所识别的每个 Qt for HarmonyOS 提供相应的套件。
一旦设置了 SDK 位置,其中的编译器就会出现在“Preferences ” > “Kits ” > “Compilers ”中,而“hdc ”报告的设备也会出现在“Preferences ” > “Devices ” > “Devices ”中,无需任何进一步配置。
另请参阅 《HarmonyOS 设备开发指南》、《HarmonyOS 开发入门》以及《HarmonyOS 包签名指南》。
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.