Problem Deploying App on Android Devices using Qt 6 kits
-
wrote on 8 May 2023, 19:08 last edited by
i have an app to be deployed on Android Device using architecture x86 or arm64V8a.
but it gives me error when i compile and deploy the app using Qt 6.2.4 Clang x86 or arm64V8a kits.
the error:
``
Error while building/deploying project Demo2_1 (kit: Android Qt 6.2.4 Clang x86)
When executing step "Deploy to Android device"but when i use Qt 5.15.2 Clang Multi-ABI kit it works and deploys the app into Android Devices.
i use emulator x86 and Physical Device arm64V8a.
what is the solution of such a problem when using Qt 6 ? -
i have an app to be deployed on Android Device using architecture x86 or arm64V8a.
but it gives me error when i compile and deploy the app using Qt 6.2.4 Clang x86 or arm64V8a kits.
the error:
``
Error while building/deploying project Demo2_1 (kit: Android Qt 6.2.4 Clang x86)
When executing step "Deploy to Android device"but when i use Qt 5.15.2 Clang Multi-ABI kit it works and deploys the app into Android Devices.
i use emulator x86 and Physical Device arm64V8a.
what is the solution of such a problem when using Qt 6 ?@Mohamad-Ayrot
To start with: configure / running CMake from creator works?
Does the kit report errors (e.g. wrong compilers)?
Does the Qt Version in creator report errors (e.g. qmake executable not found)?
Does QT_HOST_PATH point to a correctly installed host binary path? -
@Mohamad-Ayrot
To start with: configure / running CMake from creator works?
Does the kit report errors (e.g. wrong compilers)?
Does the Qt Version in creator report errors (e.g. qmake executable not found)?
Does QT_HOST_PATH point to a correctly installed host binary path?wrote on 12 May 2023, 05:49 last edited byin compile output i get error as follows:
adb: failed to stat Workshop/Demo2/build-Demo2_1-Android_Qt_6_2_4_Clang_x86-Debug/android-build//build/outputs/apk/debug/android-build-debug.apk: No such file or directory
Installing to device failed! 20:09:55: The process "/home/moa/Qt/6.2.4/gcc_64/bin/androiddeployqt" exited with code 16. 20:09:55: Installing the app failed with an unknown error.
Error while building/deploying project Demo2_1 (kit: Android Qt 6.2.4 Clang x86) When executing step "Deploy to Android device"
but these errors occurs when i use Android Qt 6.2 kits
when using Android Qt 5.14 it works fine without any error and deploys to android emulator or android device. -
in compile output i get error as follows:
adb: failed to stat Workshop/Demo2/build-Demo2_1-Android_Qt_6_2_4_Clang_x86-Debug/android-build//build/outputs/apk/debug/android-build-debug.apk: No such file or directory
Installing to device failed! 20:09:55: The process "/home/moa/Qt/6.2.4/gcc_64/bin/androiddeployqt" exited with code 16. 20:09:55: Installing the app failed with an unknown error.
Error while building/deploying project Demo2_1 (kit: Android Qt 6.2.4 Clang x86) When executing step "Deploy to Android device"
but these errors occurs when i use Android Qt 6.2 kits
when using Android Qt 5.14 it works fine without any error and deploys to android emulator or android device.@Mohamad-Ayrot said in Problem Deploying App on Android Devices using Qt 6 kits:
androiddeployqt" exited with code 16.
OK, that looks like the Android API version / architecture used, is no longer supported under Qt 6.2.
Please check for supported versions here.This older post dealt with the same problem a while ago. There are newer versions to be used today, but it shows the steps to perform.
Basically, you have to fix that in you Android SDK and install the right packages.
-
@Mohamad-Ayrot said in Problem Deploying App on Android Devices using Qt 6 kits:
androiddeployqt" exited with code 16.
OK, that looks like the Android API version / architecture used, is no longer supported under Qt 6.2.
Please check for supported versions here.This older post dealt with the same problem a while ago. There are newer versions to be used today, but it shows the steps to perform.
Basically, you have to fix that in you Android SDK and install the right packages.
wrote on 12 May 2023, 06:44 last edited by@Axel-Spoerl
i use Android 12 ( API 31 ).
in the link you referenced, talking about deactivating adb.
i don't know steps to deactivate adb. -
@Axel-Spoerl
i use Android 12 ( API 31 ).
in the link you referenced, talking about deactivating adb.
i don't know steps to deactivate adb.@Mohamad-Ayrot
Assuming you use Qt Creator: If you go to Edit->Preferences->Devices->Android, what do you see? Which NDK version is used? -
@Mohamad-Ayrot
Assuming you use Qt Creator: If you go to Edit->Preferences->Devices->Android, what do you see? Which NDK version is used?This is my working environment:
wrote on 12 May 2023, 08:22 last edited byNDK: 21.3 as default
-
NDK: 21.3 as default
@Mohamad-Ayrot said in Problem Deploying App on Android Devices using Qt 6 kits:
NDK: 21.3 as default
Check this please.
NDK 21.3 doesn't work with Qt 6.2 -
@Mohamad-Ayrot said in Problem Deploying App on Android Devices using Qt 6 kits:
NDK: 21.3 as default
Check this please.
NDK 21.3 doesn't work with Qt 6.2wrote on 12 May 2023, 11:42 last edited by -
@Mohamad-Ayrot
The compilers used in the compile kit are either autodetected or selected by the user at the point when the kit is created or modified.If you install a new NDK version at a later point, you have to update your kit:
Choose the C and C++ compilers corresponding to the NDK version you want to use.
I am using 25.something - this is how it looks.
1/10