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. How to set Android Target Architecture in Qt?
QtWS25 Last Chance

How to set Android Target Architecture in Qt?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
androidandroidqtandroiddeployqtqt5.14.1
10 Posts 4 Posters 4.9k Views
  • 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.
  • H Offline
    H Offline
    harip
    wrote on last edited by harip
    #1

    Recently, I upgraded the Qt version to 5.14.1. After the upgrade, when I try to deploy the application to a Android device, I get the following error message.

    No Android arch set by the .pro file.
    Error while building/deploying project MedLogApp (kit: Android for  (Clang Qt 5.14.1 for Android))
    When executing step "Deploy to Android device"
    

    How do I set the target Android architecture in Qt project file?
    Note: The error message is there for the example applications provided by Qt

    1 Reply Last reply
    1
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Go to Project->Build panel and select the architectures you are interested in from the list.

      If that does not work, regenerate templates (AndroidManifest etc.) with this new Qt version, then delete your old build directory, run qmake and rebuild the app.

      (Z(:^

      1 Reply Last reply
      3
      • H Offline
        H Offline
        harip
        wrote on last edited by harip
        #3

        Hi @sierdzio ,

        I didn't find any option in Build>Panel to select the target architecture. I tried regenerating the templates. But this didn't work.

        Qt Creator version : 4.9.0

        After regenerating the template files,

        contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
            ANDROID_PACKAGE_SOURCE_DIR = \
                $$PWD/android
        }
        

        is added to the project file.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Update Qt Creator. Versions older than 4.11 won't build Qt packages for Android with Qt 5.14.x.

          (Z(:^

          Pradeep P NP 1 Reply Last reply
          0
          • sierdzioS sierdzio

            Update Qt Creator. Versions older than 4.11 won't build Qt packages for Android with Qt 5.14.x.

            Pradeep P NP Offline
            Pradeep P NP Offline
            Pradeep P N
            wrote on last edited by
            #5

            Hi @sierdzio

            Dose Qt 5.14.x provides support to build APK wich support both armeabi-v7a & arm64-v8a ?

            In case if i want to build the APK supporting Both Architecture with single KIT, is it possible ?
            if I want to avoid bundling 2 APK's in to one.

            Pradeep Nimbalkar.
            Upvote the answer(s) that helped you to solve the issue...
            Keep code clean.

            sierdzioS 1 Reply Last reply
            0
            • Pradeep P NP Pradeep P N

              Hi @sierdzio

              Dose Qt 5.14.x provides support to build APK wich support both armeabi-v7a & arm64-v8a ?

              In case if i want to build the APK supporting Both Architecture with single KIT, is it possible ?
              if I want to avoid bundling 2 APK's in to one.

              sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              @Pradeep-P-N said in How to set Android Target Architecture in Qt?:

              Hi @sierdzio

              Dose Qt 5.14.x provides support to build APK wich support both armeabi-v7a & arm64-v8a ?

              In case if i want to build the APK supporting Both Architecture with single KIT, is it possible ?

              Yes. arm, arm64, x86 and x86_64 can all be bundled into a single package.

              if I want to avoid bundling 2 APK's in to one.

              With 5.14.x qmake will do this bundling for you automatically.

              (Z(:^

              Pradeep P NP 1 Reply Last reply
              2
              • sierdzioS sierdzio

                @Pradeep-P-N said in How to set Android Target Architecture in Qt?:

                Hi @sierdzio

                Dose Qt 5.14.x provides support to build APK wich support both armeabi-v7a & arm64-v8a ?

                In case if i want to build the APK supporting Both Architecture with single KIT, is it possible ?

                Yes. arm, arm64, x86 and x86_64 can all be bundled into a single package.

                if I want to avoid bundling 2 APK's in to one.

                With 5.14.x qmake will do this bundling for you automatically.

                Pradeep P NP Offline
                Pradeep P NP Offline
                Pradeep P N
                wrote on last edited by
                #7

                @sierdzio
                Thank you.

                I am using Qt 5.12.2 LTS where i build them independently (Not sure if bundling is available in Qt 5.12.2 LTS).
                I will try with 5.14.x

                Pradeep Nimbalkar.
                Upvote the answer(s) that helped you to solve the issue...
                Keep code clean.

                sierdzioS 1 Reply Last reply
                0
                • Pradeep P NP Pradeep P N

                  @sierdzio
                  Thank you.

                  I am using Qt 5.12.2 LTS where i build them independently (Not sure if bundling is available in Qt 5.12.2 LTS).
                  I will try with 5.14.x

                  sierdzioS Offline
                  sierdzioS Offline
                  sierdzio
                  Moderators
                  wrote on last edited by
                  #8

                  @Pradeep-P-N said in How to set Android Target Architecture in Qt?:

                  (Not sure if bundling is available in Qt 5.12.2 LTS).

                  It is not. Bundling was added in Qt 5.14 and UI for it in Qt Creator 4.11.

                  (Z(:^

                  P 1 Reply Last reply
                  3
                  • sierdzioS sierdzio

                    @Pradeep-P-N said in How to set Android Target Architecture in Qt?:

                    (Not sure if bundling is available in Qt 5.12.2 LTS).

                    It is not. Bundling was added in Qt 5.14 and UI for it in Qt Creator 4.11.

                    P Offline
                    P Offline
                    PooyaSis
                    wrote on last edited by
                    #9

                    @sierdzio
                    hi
                    Qt creator shows this message
                    No Android arch set by the .pro file.

                    what should I do?

                    1 Reply Last reply
                    0
                    • sierdzioS Offline
                      sierdzioS Offline
                      sierdzio
                      Moderators
                      wrote on last edited by
                      #10
                      • Post your environment information (OS, Qt version, Qt Creator version)
                      • Are Android SDK & NDK installed and set up in Qt Creator?
                      • Have you selected the architecture in Projects->Build pane of Qt Creator?
                      • Is this a new project or some older one which you are porting to newer Qt version?

                      (Z(:^

                      1 Reply Last reply
                      0

                      • Login

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