QT_ANDROID_DEPLOYMENT_TYPE

强制或禁用发布包签名,无论构建类型如何。

该变量自 Qt 6.7 起引入。

注意: 仅当目标平台为 Android 时,才会使用此 变量。

当设置为Release 时,无论应用程序的构建类型如何,都会将--release 标志传递给androiddeployqt 工具。当设置为其他值时,--release 标志绝不会被传递给该工具,这实际上会禁用发布包签名,即使在Release或RelWithDebInfo构建中也是如此。若未设置,默认行为是在除Debug以外的构建类型中使用发布包签名。

该变量不应在 CMake 项目文件中设置。而应在命令行配置项目时,或在 IDE 的 CMake 设置中进行设置。

另请参阅 androiddeployqt。

© 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.