QT 6.4.1 Android Installing the app failed with an unknown error.
-
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 ?
-
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.
-
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.@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...
@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.
-