Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-33077

QtC 17 can't deploy signed APKs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 17.0.0-rc1
    • Android Support
    • None
    • Android, macOS

    Description

      Steps to reproduce:

      1. Open example of choice (for example calqlatr)
      2. Go to Project -> Build steps -> Build Android APK
      3. App valid keystore and password for the keystore
      4. Deploy the example to a device

      Expected:

          Example deploys without issues

      Actual:

          androiddeployqt fails to find the APK to deploy

       

      This is a regression from QtC 16.

      Full compile log included as an attachment, the failure is:

      Skipping createRCC
      adb: failed to stat /Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/demos/coffee/build/Android_Qt_6_9_1_Clang_arm64_v8a-Debug/android-build-coffeemachine//build/outputs/apk/debug/android-build-coffeemachine-debug.apk: No such file or directory
      Installing Android package to device.
      Running command "/Users/ollivuolteenaho/Library/Android/sdk/platform-tools/adb -s emulator-5554  install -r /Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/demos/coffee/build/Android_Qt_6_9_1_Clang_arm64_v8a-Debug/android-build-coffeemachine//build/outputs/apk/debug/android-build-coffeemachine-debug.apk"
      Performing Streamed Install
      Installing to device failed!
      09:31:35: The process "/Users/ollivuolteenaho/Qt/6.9.1/macos/bin/androiddeployqt" exited with code 16.
      09:31:35: Installing the app failed with an unknown error.
      

      As this is a signed build, the actual APK is named "android-build-coffeemachine-debug-signed.apk, as can be seen in the log:

      Android package built successfully in 4.046 ms.
        -- File: /Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/demos/coffee/build/Android_Qt_6_9_1_Clang_arm64_v8a-Debug/android-build-coffeemachine//build/outputs/apk/debug/android-build-coffeemachine-debug-signed.apk

      The core issue seems to be that QtC 17 calls androiddeployqt without the "-sign" parameter. This can be seen when comparing QtC 16 execution to 17. On QtC16:

      09:23:25: Starting: "/Users/ollivuolteenaho/Qt/6.9.1/macos/bin/androiddeployqt --verbose --output /Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/demos/calqlatr/build/Android_Qt_6_9_1_Clang_arm64_v8a-Debug/android-build-calqlatrexample --no-build --input /Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/demos/calqlatr/build/Android_Qt_6_9_1_Clang_arm64_v8a-Debug/android-calqlatrexample-deployment-settings.json --gradle --sign foo bar --reinstall --device emulator-5554"
      

      Note "–sign foo bar". On QtC17:

      09:31:34: Starting: "/Users/ollivuolteenaho/Qt/6.9.1/macos/bin/androiddeployqt --verbose --output /Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/demos/coffee/build/Android_Qt_6_9_1_Clang_arm64_v8a-Debug/android-build-coffeemachine --no-build --input /Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/demos/coffee/build/Android_Qt_6_9_1_Clang_arm64_v8a-Debug/android-coffeemachine-deployment-settings.json --gradle --reinstall --device emulator-5554"

      Attachments

        1. compile_output.txt
          33 kB
          Olli Vuolteenaho
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            portale Alessandro Portale
            olvuolte Olli Vuolteenaho
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes