QT_ANDROID_PACKAGE_NAME

アプリのパッケージ名。

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

注:この プロパティは、Androidプラットフォームを対象とする場合にのみ使用されます。

アプリのパッケージ名を指定します。これは通常、アプリを一意に識別するためのドット区切りの名前であり、デバイス上やPlayストアでアプリを識別するために使用されます。例:「org.qtproject.gallery」。

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

このプロパティで設定されたパッケージ名は、build.gradle ファイルにnamespace プロパティとして渡されます。これは、AndroidManifest.xml が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.gradle でパッケージ名を手動で設定した場合 (namespace プロパティを使用)、AndroidManifest.xml (package 属性を使用)よりも優先され、また、後者はこのプロパティよりも優先されます。

詳細については、Androidの「アプリモジュールの設定」を参照してください。

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.