Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 17.0.0-rc1
-
None
Description
Steps to reproduce:
- Open example of choice (for example calqlatr)
- Go to Project -> Build steps -> Build Android APK
- App valid keystore and password for the keystore
- 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"