Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Problem Deploying App on Android Devices using Qt 6 kits
Forum Updated to NodeBB v4.3 + New Features

Problem Deploying App on Android Devices using Qt 6 kits

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 2 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mohamad Ayrot
    wrote on 8 May 2023, 19:08 last edited by
    #1

    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 ?

    A 1 Reply Last reply 9 May 2023, 05:28
    0
    • M Mohamad Ayrot
      8 May 2023, 19:08

      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 ?

      A Offline
      A Offline
      Axel Spoerl
      Moderators
      wrote on 9 May 2023, 05:28 last edited by
      #2

      @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?

      Software Engineer
      The Qt Company, Oslo

      M 1 Reply Last reply 12 May 2023, 05:49
      0
      • A Axel Spoerl
        9 May 2023, 05:28

        @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?

        M Offline
        M Offline
        Mohamad Ayrot
        wrote on 12 May 2023, 05:49 last edited by
        #3

        @Axel-Spoerl

        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.

        A 1 Reply Last reply 12 May 2023, 06:01
        0
        • M Mohamad Ayrot
          12 May 2023, 05:49

          @Axel-Spoerl

          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.

          A Offline
          A Offline
          Axel Spoerl
          Moderators
          wrote on 12 May 2023, 06:01 last edited by
          #4

          @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.

          Software Engineer
          The Qt Company, Oslo

          M 1 Reply Last reply 12 May 2023, 06:44
          0
          • A Axel Spoerl
            12 May 2023, 06:01

            @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.

            M Offline
            M Offline
            Mohamad Ayrot
            wrote on 12 May 2023, 06:44 last edited by
            #5

            @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.

            A 1 Reply Last reply 12 May 2023, 07:14
            0
            • M Mohamad Ayrot
              12 May 2023, 06:44

              @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.

              A Offline
              A Offline
              Axel Spoerl
              Moderators
              wrote on 12 May 2023, 07:14 last edited by
              #6

              @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:
              984bd63c-422d-43b5-978b-9221111c7102-image.png

              Software Engineer
              The Qt Company, Oslo

              M 1 Reply Last reply 12 May 2023, 08:22
              0
              • A Axel Spoerl
                12 May 2023, 07:14

                @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:
                984bd63c-422d-43b5-978b-9221111c7102-image.png

                M Offline
                M Offline
                Mohamad Ayrot
                wrote on 12 May 2023, 08:22 last edited by
                #7

                @Axel-Spoerl
                Screenshot from 2023-05-12 11-21-57.png

                NDK: 21.3 as default

                A 1 Reply Last reply 12 May 2023, 09:28
                0
                • M Mohamad Ayrot
                  12 May 2023, 08:22

                  @Axel-Spoerl
                  Screenshot from 2023-05-12 11-21-57.png

                  NDK: 21.3 as default

                  A Offline
                  A Offline
                  Axel Spoerl
                  Moderators
                  wrote on 12 May 2023, 09:28 last edited by
                  #8

                  @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

                  Software Engineer
                  The Qt Company, Oslo

                  M 1 Reply Last reply 12 May 2023, 11:42
                  0
                  • A Axel Spoerl
                    12 May 2023, 09:28

                    @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

                    M Offline
                    M Offline
                    Mohamad Ayrot
                    wrote on 12 May 2023, 11:42 last edited by
                    #9

                    @Axel-Spoerl

                    i installed NDK 25 and 23, but both shows the same issue.

                    Screenshot from 2023-05-12 14-41-38.png

                    A 1 Reply Last reply 12 May 2023, 12:43
                    0
                    • M Mohamad Ayrot
                      12 May 2023, 11:42

                      @Axel-Spoerl

                      i installed NDK 25 and 23, but both shows the same issue.

                      Screenshot from 2023-05-12 14-41-38.png

                      A Offline
                      A Offline
                      Axel Spoerl
                      Moderators
                      wrote on 12 May 2023, 12:43 last edited by
                      #10

                      @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.

                      be655d0e-99ac-4cce-9a3a-12e2b46cc5fc-image.png

                      Software Engineer
                      The Qt Company, Oslo

                      1 Reply Last reply
                      0

                      1/10

                      8 May 2023, 19:08

                      • Login

                      • Login or register to search.
                      1 out of 10
                      • First post
                        1/10
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved