QT_ANDROID_BUILD_DIR

Read-only path to the Android build directory for the target.

This property was introduced in Qt 6.12.

Note: This property is used only if targeting the Android platform.

Contains the path to the android-build directory used for packaging the target as an Android APK or AAB. The exact path depends on whether QT_USE_TARGET_ANDROID_BUILD_DIR is set: when TRUE the path is <binary-dir>/android-build-<target>; otherwise <binary-dir>/android-build.

The property is set when qt_add_executable() is called and is immediately available without waiting for target finalization.

This property is useful when referencing the build directory in custom commands:

 qt_add_executable(MyApp main.cpp)

 get_target_property(android_build_dir MyApp QT_ANDROID_BUILD_DIR)
 add_custom_command(POST_BUILD TARGET MyApp
     WORKING_DIRECTORY "${android_build_dir}"
     COMMAND cmd /c "${android_build_dir}/postbuild.cmd"
 )

Projects should not set this property manually.

See also QT_ANDROID_DEPLOYMENT_SETTINGS_FILE and QT_USE_TARGET_ANDROID_BUILD_DIR.