QT 6.4.1 Android Installing the app failed with an unknown error.
-
wrote on 24 Nov 2022, 15:05 last edited by
When compiling / installing a sample Android application (QT Creator 9, new instalation) I get this error:
Skipping createRCC
adb: failed to install C:/Qt/Examples/Qt-6.4.1/quickcontrols2/build-gallery-Android_Qt_6_4_1_Clang_x86_64-Release/android-build//build/outputs/apk/release/android-build-release-unsigned.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl686382759.tmp/base.apk: Attempt to get length of null array]
Installing Android package to device.
Running command "C:/Users/cyniu/AppData/Local/Android/Sdk/platform-tools/adb.exe -s emulator-5554 install -r C:/Qt/Examples/Qt-6.4.1/quickcontrols2/build-gallery-Android_Qt_6_4_1_Clang_x86_64-Release/android-build//build/outputs/apk/release/android-build-release-unsigned.apk"
Performing Streamed Install
Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Windows
Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.macOS
Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.iOS
Installing to device failed!
14:22:13: Proces "C:\Qt\6.4.1\mingw_64\bin\androiddeployqt.exe" finished the job with the output code 16.
14:22:13: Installing the app failed with an unknown error.
14:22:13: Pulling files necessary for debugging.how to fix it ?
-
wrote on 29 Nov 2022, 14:38 last edited by
The same problem after installing QT 6.4.1 this problem show up
:-1: warning: Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Windows Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.macOS Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.iOS Import found outside of import paths: C:/Users/Aninoss/Documents/Programming/Qt/Android Test/gallery/gallery.qml.
-
wrote on 29 Nov 2022, 21:57 last edited by
My go-to solution has been to create a signed APK (using
androiddeployqt
), copy it manually to the device and install it from the file-app.
Works just fine.But its needed to sign the apk, a simple self-signed keystore is no problem there. I even pushed that keystore to my public git repo (will not use that for actual releases obviously) to make it easy for everyone.
If I didn't sign the apk, I just got a weird error like "install failed" in the Android interface. -
My go-to solution has been to create a signed APK (using
androiddeployqt
), copy it manually to the device and install it from the file-app.
Works just fine.But its needed to sign the apk, a simple self-signed keystore is no problem there. I even pushed that keystore to my public git repo (will not use that for actual releases obviously) to make it easy for everyone.
If I didn't sign the apk, I just got a weird error like "install failed" in the Android interface.wrote on 5 Dec 2022, 19:55 last edited by mzimmers 12 May 2022, 20:08@TomZ this problem just appeared for me as well. What's interesting is that I had been able to start my app on an emulator, but now get this error. I never had to use androiddeployqt to get it to work.
Any suggestions on what to look at?
Thanks...
-
@TomZ this problem just appeared for me as well. What's interesting is that I had been able to start my app on an emulator, but now get this error. I never had to use androiddeployqt to get it to work.
Any suggestions on what to look at?
Thanks...
wrote on 6 Dec 2022, 19:51 last edited by@mzimmers said in QT 6.4.1 Android Installing the app failed with an unknown error.:
I never had to use androiddeployqt to get it to work.
Thats run by QtCreator (well, really by cmake) under the covers. You won't notice. The point to the original poster is that you can sidestep the auto-deploy-to-device and just copy the apk and install it. Provided you sign it.
That helps a lot with debugging and figuring out which part fails.
-
wrote on 6 Dec 2022, 20:38 last edited by
Actually for me helps signing the apk:
go to: Projects|Build Settings|Build Android APK|Application Signature
To create "android_release.keystore" push the button: Create
After creating and choice the Keystore, check "Sign package".
Enjoy. -
wrote on 6 Dec 2022, 22:07 last edited by
Thanks, guys - when I posted that, I didn't realize that I had to re-check the sign box every time I build. Your suggestions were the fix.
-
2/7