The app's package name.
该特性在 Qt 6.8 引入。
注意: This property is used only if targeting the Android platform.
Specifies the app's package name. This is usually a unique dot separated name for the app, that will be used to identify the app on devices or in the Play Store. For example, "org.qtproject.gallery".
set_target_properties(${target} PROPERTIES
QT_ANDROID_PACKAGE_NAME "org.qtproject.gallery"
)
The package name set by this property is passed to the
build.gradle
file as a
namespace
property, instead of
AndroidManifest.xml
, since the latter is deprecated since Android Gradle Plugin 7.4.
The package name considers some words or characters as illegal and the build will clean such names if any is encountered. An underscore (
_
) either replaces illegal characters or is appended to illegal words.
The default package name for Qt for Android apps is
org.qtproject.example.<target_name>
.
注意:
Setting the package name manually in
build.gradle
(via
namespace
property) takes precedence over
AndroidManifest.xml
(via
package
attribute), and the latter also takes precedence over this property.
For more information, see Android's configure the app module .