Error when deploying Android project



  • Hi, I'm using Qt 5.14, SDK 26.1.1 and NDK 20.1
    when I build project (default project) everything is okay but when I run it I get this error

    BUILD SUCCESSFUL in 8s
    25 actionable tasks: 2 executed, 23 up-to-date
    adb: failed to install /home/amn/Programs/android/build-untitled5-Android_x86-Debug/android-build//build/outputs/apk/debug/android-build-debug.apk: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
    Installing to device failed!
    Installing Android package to device.
    Running command "/home/amn/opt/android-sdk/platform-tools/adb -s emulator-5554  install -r /home/amn/Programs/android/build-untitled5-Android_x86-Debug/android-build//build/outputs/apk/debug/android-build-debug.apk"
    Performing Streamed Install
    04:15:18: The process "/home/amn/opt/Qt5/5.14.0/android/bin/androiddeployqt" exited with code 16.
    04:15:18: Pulling files necessary for debugging.
    04:15:18: Package deploy: Running command "/home/amn/opt/android-sdk/platform-tools/adb -s emulator-5554 pull /system/bin/app_process /home/amn/Programs/android/build-untitled5-Android_x86-Debug/app_process".
    04:15:18: Package deploy: Running command "/home/amn/opt/android-sdk/platform-tools/adb -s emulator-5554 pull /system/bin/app_process32 /home/amn/Programs/android/build-untitled5-Android_x86-Debug/app_process".
    04:15:18: Package deploy: Running command "/home/amn/opt/android-sdk/platform-tools/adb -s emulator-5554 pull /system/bin/linker /home/amn/Programs/android/build-untitled5-Android_x86-Debug/linker".
    04:15:18: Package deploy: Running command "/home/amn/opt/android-sdk/platform-tools/adb -s emulator-5554 pull /system/lib/libc.so /home/amn/Programs/android/build-untitled5-Android_x86-Debug/libc.so".
    Error while building/deploying project untitled5 (kit: Android x86)
    When executing step "Deploy to Android device"
    04:15:18: Elapsed time: 00:19.
    

    what's wrong?


  • Qt Champions 2019

    @no_1imit Which exact Qt version do you use? There are ARM and x86 Android versions.


  • Moderators

    @jsulm
    from the log:

    Error while building/deploying project untitled5 (kit: Android x86)
    When executing step "Deploy to Android device"
    04:15:18: Elapsed time: 00:19.
    

    As most android devices are arm based, that is most likely the issue here



  • ARM
    Screenshot_2020-01-07_04-31-01.png


  • Qt Champions 2019

    @no_1imit As @J-Hilk pointed out you're using x86 (see the log you posted) which is not going to work on ARM.



  • @J-Hilk I was testing kits but I still have problem with ARM (default detected)
    there is the error

    BUILD SUCCESSFUL in 7s
    25 actionable tasks: 2 executed, 23 up-to-date
    adb: failed to install /home/amn/Programs/android/build-untitled7-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_0_for_Android-Debug/android-build//build/outputs/apk/debug/android-build-debug.apk: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
    Installing Android package to device.
    Running command "/home/amn/opt/android-sdk/platform-tools/adb -s emulator-5554  install -r /home/amn/Programs/android/build-untitled7-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_0_for_Android-Debug/android-build//build/outputs/apk/debug/android-build-debug.apk"
    Performing Streamed Install
    Installing to device failed!
    04:26:58: The process "/home/amn/opt/Qt5/5.14.0/android/bin/androiddeployqt" exited with code 16.
    04:26:58: Pulling files necessary for debugging.
    04:26:58: Package deploy: Running command "/home/amn/opt/android-sdk/platform-tools/adb -s emulator-5554 pull /system/bin/app_process /home/amn/Programs/android/build-untitled7-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_0_for_Android-Debug/app_process".
    04:26:58: Package deploy: Running command "/home/amn/opt/android-sdk/platform-tools/adb -s emulator-5554 pull /system/bin/app_process32 /home/amn/Programs/android/build-untitled7-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_0_for_Android-Debug/app_process".
    04:26:58: Package deploy: Running command "/home/amn/opt/android-sdk/platform-tools/adb -s emulator-5554 pull /system/bin/linker /home/amn/Programs/android/build-untitled7-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_0_for_Android-Debug/linker".
    04:26:58: Package deploy: Running command "/home/amn/opt/android-sdk/platform-tools/adb -s emulator-5554 pull /system/lib/libc.so /home/amn/Programs/android/build-untitled7-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_0_for_Android-Debug/libc.so".
    Error while building/deploying project untitled7 (kit: Android for armeabi-v7a,arm64-v8a,x86,x86_64 (Clang Qt 5.14.0 for Android))
    When executing step "Deploy to Android device"
    04:26:58: Elapsed time: 00:26.
    

  • Qt Champions 2019

    @no_1imit You really should rename your Kit as "Android for armeabi-v7a,arm64-v8a,x86,x86_64" is simply confusing as a Kit can't be for both ARM and x86 at the same time!
    Can you post screenshot of your "Qt 5.14.0 for Android" from "Qt Versions" tab?


  • Moderators

    @jsulm said in Error when deploying Android project:

    @no_1imit You really should rename your Kit as "Android for armeabi-v7a,arm64-v8a,x86,x86_64" is simply confusing as a Kit can't be for both ARM and x86 at the same time!
    Can you post screenshot of your "Qt 5.14.0 for Android" from "Qt Versions" tab?

    Actually, I'm not so sure about that anymore.
    I haven't updated jet, but shouldn't the 5.14 update bring the unified AAB package support for android? That could reduce everything to one precompiled kit, if properly set up!?


  • Qt Champions 2019

    @J-Hilk Oh, I remember reading something about it now. Yes, could be.



  • @no_1imit @jsulm @J-Hilk The last Qt for Android Kit is multi-platform, but you have to choose the active platform in "Projects".

    Take a look at ==> https://www.kdab.com/qt-for-android-better-than-ever-before/



  • @jsulm said in Error when deploying Android project:

    Qt Versions

    sorry I'm beginner. do you mean this page?
    Screenshot_2020-01-07_04-58-02.png


  • Qt Champions 2019

    @no_1imit Check what @KroMignon wrote


Log in to reply