qt_android_package_name

アプリのパッケージ名。

このプロパティは Qt 6.8 で導入されました。

注意: このプロパティは、Android プラットフォームをターゲットにしている場合にのみ使用されます。

アプリのパッケージ名を指定します。これは通常、アプリのユニークなドット区切りの名前で、デバイスやPlayストアでアプリを識別するために使用されます。例えば、"org.qtproject.gallery "です。

set_target_properties(${target} PROPERTIES
    QT_ANDROID_PACKAGE_NAME "org.qtproject.gallery"
)

このプロパティで設定されたパッケージ名は、AndroidManifest.xml の代わりに、namespace プロパティとしてbuild.gradle ファイルに渡されます。後者は Android Gradle Plugin 7.4 以降、非推奨となっているためです。

パッケージ名は、いくつかの単語や文字を不正とみなし、そのような名前に遭遇した場合、ビルドはそのような名前をクリーンアップします。アンダースコア (_) は、不正な文字を置き換えるか、不正な単語に付加されます。

  • 許可される文字:英数字、アンダースコア、ドット [a-zA-Z0-9_.]。
  • 不正な単語:abstract、continue、for、new、switch、assert、default、if、package、synchronized、boolean、do、goto、private、this、break、double、implements、protected、throw、byte、else、import、public、throws、case、enum、instanceof、return、transient、catch、extends、int、short、try、char、final、interface、static、void、class、finally、long、strictfp、volatile、const、float、native、super、while。

Qt for Android アプリのデフォルトのパッケージ名はorg.qtproject.example.<target_name> です。

注: build.gradlenamespace プロパティ経由)でパッケージ名を手動で設定すると、AndroidManifest.xmlpackage 属性経由)よりも優先され、後者はこのプロパティよりも優先されます。

詳細については、Androidのconfigure the appモジュールを参照してください。

qt_android_generate_deployment_settings()も参照してください

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