QT_ANDROID_PACKAGE_SOURCE_DIR

自定义 Android 包模板的路径。

该属性自 Qt 6.0 起引入。

注意: 仅当目标平台为 Android 时,才使用此 属性。

指定自定义 Android 包模板的路径。Android 包模板包含:

  • AndroidManifest.xml 文件
  • build.gradle 文件及其他 Gradle 脚本
  • res/values/libs.xml 文件

该变量指定的路径可包含位于src 目录下的自定义 Java 类。默认情况下,androiddeployqt工具会将应用程序模板从 Qt for Android 的安装路径复制到项目的构建目录中,然后将该变量指定的路径中的内容复制到该模板之上,并覆盖任何现有文件。 例如,您可以为应用程序创建一个自定义的 `AndroidManifest.xml ` 文件,然后将其直接放置到该变量指定的目录中。

另请参阅 qt_android_generate_deployment_settings()。

© 2026 The Qt Company Ltd. 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.