Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT 6.5 signs debug package
Forum Update on Monday, May 27th 2025

QT 6.5 signs debug package

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
androidqtcreator
2 Posts 2 Posters 469 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dmitriano
    wrote on last edited by Dmitriano
    #1

    When I build my app with QT 6.4.3 for Android in RelWithDebInfo configuration the release package is signed:

    BUILD SUCCESSFUL in 1m 17s
    88 actionable tasks: 88 executed
    Signing file D:/dev/repos/examples/src/MyApp/build-MyAppQt-Android_Qt_6_4_3_arm64_v8a_release_Clang_arm64_v8a-RelWithDebInfo/android-build//build/outputs/bundle/release/android-build-release.aab
    

    But when I try to build my app with QT 6.5.0 in RelWithDebInfo configuration the debug package is signed:

    BUILD SUCCESSFUL in 50s
    83 actionable tasks: 43 executed, 40 up-to-date
    Signing file D:/dev/repos/examples/src/MyApp/build-MyAppQt-Android_Qt_6_5_0_arm64_v8a_release_Clang_arm64_v8a-RelWithDebInfo/android-build//build/outputs/bundle/debug/android-build-debug.aab
    

    what happened in QT 6.5.0?

    Also QT Creator 10 displays "Signing a debug package" warning with both QT 6.4.3 and QT 6.5 QT:

    c9987c6a-c302-4830-ac8e-a1bbf66816f8-image.png

    When I build my app with QT 6.5.0 in Release configuration the release package is signed:

    BUILD SUCCESSFUL in 55s
    88 actionable tasks: 88 executed
    Signing file D:/dev/repos/examples/src/MyApp/build-MyAppQt-Android_Qt_6_5_0_arm64_v8a_release_Clang_arm64_v8a-Release/android-build//build/outputs/bundle/release/android-build-release.aab
    

    and there is no warning in QT Creator.

    So looks like QT Creator or some build scripts do not understand that RelWithDebInfo is a release configuration, but not debug.

    Is there a simple workaround?

    Found the following code in QT Creator in https://github.com/qt-creator/qt-creator/blob/master/src/plugins/android/androidbuildapkstep.cpp:

    void AndroidBuildApkWidget::updateSigningWarning()
    {
        bool nonRelease = m_step->buildType() != BuildConfiguration::Release;
        bool visible = m_step->signPackage() && nonRelease;
        m_signingDebugWarningLabel->setVisible(visible);
    }
    

    where BuildType is

    enum BuildType {
            Unknown,
            Debug,
            Profile,
            Release
        };
    

    so the condition m_step->buildType() != BuildConfiguration::Release is probably false if my configuration is RelWithDebInfo

    Is it a bug?

    The workaround is to always generate debug symbols in Release configuration:

    target_compile_options(example_target PRIVATE
        $<$<CXX_COMPILER_ID:MSVC>:/Zi>
        $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-g>
        )
    
    1 Reply Last reply
    0
    • TomZT Offline
      TomZT Offline
      TomZ
      wrote on last edited by
      #2

      I always sign all packages I deploy on the device, regardless of it being a debug or release one.

      Why would debug vs release make any difference in whether it should be signed or not?

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved