Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Quick Application doesn't buil a .apk file
Qt 6.11 is out! See what's new in the release blog

Qt Quick Application doesn't buil a .apk file

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 3 Posters 2.6k Views 3 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.
  • tomyT Offline
    tomyT Offline
    tomy
    wrote on last edited by tomy
    #1

    Hello,

    Using a Qt Quick Application (project name: SimpleUI), I ran this example using the Desktop kit correctly. Then went for testing the app using both Android for armeabi-v7a (GCC 4.9, Qt 5.9.0 for Android armv7) and Android for x86 (GCC 4.9, Qt 5.9.0 for Android x86) kits in both Debug and Release modes. I don't have an Android device and used emulators for both non-Desktop kits, although they didn't show the output of the app!
    Now my folder looks like this, and I searched the .apk file to test it somewhere else and searched the folders by *.apk but I couldn't find such a file!
    https://s1.postimg.org/qpql2b8e7/Capture.png

    What is the problem please?

    Qt Creator IDE ver: 4.3.0
    Qt ver: 5.9

    Venkatesh VV 1 Reply Last reply
    0
    • tomyT tomy

      Hello,

      Using a Qt Quick Application (project name: SimpleUI), I ran this example using the Desktop kit correctly. Then went for testing the app using both Android for armeabi-v7a (GCC 4.9, Qt 5.9.0 for Android armv7) and Android for x86 (GCC 4.9, Qt 5.9.0 for Android x86) kits in both Debug and Release modes. I don't have an Android device and used emulators for both non-Desktop kits, although they didn't show the output of the app!
      Now my folder looks like this, and I searched the .apk file to test it somewhere else and searched the folders by *.apk but I couldn't find such a file!
      https://s1.postimg.org/qpql2b8e7/Capture.png

      What is the problem please?

      Qt Creator IDE ver: 4.3.0
      Qt ver: 5.9

      Venkatesh VV Offline
      Venkatesh VV Offline
      Venkatesh V
      wrote on last edited by
      #2

      @tomy
      Hi,
      There may be a mismatch of api level required by your device.
      first check which api level you are using and update the api level that your device required, by using the appropriate Android SDK.

      1 Reply Last reply
      1
      • tomyT Offline
        tomyT Offline
        tomy
        wrote on last edited by
        #3

        Hi, and thank you.
        Here is my SDK:

        alt text

        They seem to be up fine enough. Should I add some things to it?

        Venkatesh VV 1 Reply Last reply
        0
        • tomyT tomy

          Hi, and thank you.
          Here is my SDK:

          alt text

          They seem to be up fine enough. Should I add some things to it?

          Venkatesh VV Offline
          Venkatesh VV Offline
          Venkatesh V
          wrote on last edited by
          #4

          @tomy
          hi,
          also check what api level your device requires,
          for example if the device version is Android 4.3 Jellybean, it needs api level 18.
          right now you have api level 24 and 25 with you so that device version should be Android 7.0 Nougat or Android 7.1.1 Nougat.

          I dont think that you have an android 7.0(api level 24) device. try with some minimal api level.

          1 Reply Last reply
          2
          • tomyT Offline
            tomyT Offline
            tomy
            wrote on last edited by
            #5

            Thank you for your reply.

            also check what api level your device requires,

            I don't have a real/physical device, but emulators (AVDs). I have two AVDs as follows:

            alt text

            And if you meant them, by devices, I don't know how to do that or check. If possible, please provide some simple explanation on the issue so that I will be able to figure your intention out properly. :-)

            1 Reply Last reply
            0
            • tomyT Offline
              tomyT Offline
              tomy
              wrote on last edited by
              #6

              Any other help on recognizing and finally solving the issue?

              mrjjM Venkatesh VV 2 Replies Last reply
              0
              • tomyT tomy

                Any other help on recognizing and finally solving the issue?

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @tomy
                Did you look in
                projects > Build Android APK > Details.
                http://doc.qt.io/qtcreator/creator-deploying-android.html

                tomyT 1 Reply Last reply
                0
                • tomyT tomy

                  Any other help on recognizing and finally solving the issue?

                  Venkatesh VV Offline
                  Venkatesh VV Offline
                  Venkatesh V
                  wrote on last edited by
                  #8

                  @tomy
                  Hi,
                  check Apache Ant path is pointing to the right place or not.

                  tomyT 1 Reply Last reply
                  0
                  • Venkatesh VV Venkatesh V

                    @tomy
                    Hi,
                    check Apache Ant path is pointing to the right place or not.

                    tomyT Offline
                    tomyT Offline
                    tomy
                    wrote on last edited by
                    #9

                    @Venkatesh-V
                    Hi,
                    I don't use Ant, but Gradle instead.

                    alt text

                    1 Reply Last reply
                    0
                    • mrjjM mrjj

                      @tomy
                      Did you look in
                      projects > Build Android APK > Details.
                      http://doc.qt.io/qtcreator/creator-deploying-android.html

                      tomyT Offline
                      tomyT Offline
                      tomy
                      wrote on last edited by tomy
                      #10

                      @mrjj

                      Did you look in
                      projects > Build Android APK > Details.

                      Yes. Using SimpleUI project I went through the path and found details for both architectures.
                      Here is for the Arm and this one for the x86.

                      http://doc.qt.io/qtcreator/creator-deploying-android.html

                      Did you mean the following part by the link above?

                      Creating Distributable APK Packages

                      To copy Qt libraries and files to the project directory and to bundle them as part of the APK, select the Bundle Qt libraries in APK option.

                      If so, that option is checked beforehand.

                      Does everything seem OK?

                      1 Reply Last reply
                      0
                      • tomyT Offline
                        tomyT Offline
                        tomy
                        wrote on last edited by tomy
                        #11

                        Hi,

                        I updated the SDK and created an Arm AVD and ran the app and waited until the end. It says, at the end:
                        FAILURE: Build failed with an exception.
                        This screen and this one are the full message.
                        :-(

                        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