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. Unable to Deploy Android Application
Forum Updated to NodeBB v4.3 + New Features

Unable to Deploy Android Application

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
15 Posts 5 Posters 7.1k 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.
  • S Offline
    S Offline
    Shahar Klinger
    wrote on last edited by
    #1

    Hello everyone,

    I'm using Qt 5.7.0, Qt Creator 4.1.0, on Windows 7.
    All components for Android development were installed and configured in Tools -> Options -> Android. Aside from the warning "Qt versions for 3 architectures are missing", the kits were automatically created.
    An Android phone is connected to my computer and recognized using adb.

    I'm able to compile one of the examples without any errors, but when trying to run the application, I get the error:
    Cannot find the android build step.
    Error while building/deploying project calqlatr (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.7.0))
    When executing step "Deploy to Android device"

    Am I missing some components maybe?

    Thank you for your assistance.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      Kuhlschrank Dino
      wrote on last edited by
      #2

      I think you might be missing ANT or Gradle. You can configure it just below the settings for the Android SDK and NDK. You can download ANT here: http://ant.apache.org/bindownload.cgi .

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Shahar Klinger
        wrote on last edited by
        #3

        Thanks Dino, Ant was already installed and found by Qt Creator. However, I ran 'ant.bat' in a command line window, and it did complain that it can't find 'tools.jar' in the expected location. I fixed the Java path and now Ant runs OK, but Qt still shows up the same error.

        1 Reply Last reply
        0
        • NickVN Offline
          NickVN Offline
          NickV
          wrote on last edited by
          #4

          Your system is x86 or x64?
          If it is x86 then that is the problem and you should download platform tools version 23 for your sdk.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Shahar Klinger
            wrote on last edited by
            #5

            Nick, if by system you mean the operating system, than it is x64. The platform-tools version is 24.0.3.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              Kuhlschrank Dino
              wrote on last edited by Kuhlschrank Dino
              #6

              Please also check that the Android SDK Build-Tools are installed. They are listed in the Android SDK Manger -> Tools.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Shahar Klinger
                wrote on last edited by
                #7

                Yes, I have Android SDK Build-Tools 24.0.2 installed.

                S 1 Reply Last reply
                0
                • S Shahar Klinger

                  Yes, I have Android SDK Build-Tools 24.0.2 installed.

                  S Offline
                  S Offline
                  Srujan
                  wrote on last edited by
                  #8

                  @Shahar-Klinger
                  You can also download sdk and ndk tools from Android SDK tool kit and Android NDK tool kit

                  1 Reply Last reply
                  0
                  • NickVN Offline
                    NickVN Offline
                    NickV
                    wrote on last edited by
                    #9

                    You should download from sdk manager the google usb driver also.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      Shahar Klinger
                      wrote on last edited by
                      #10

                      Thanks Nick, it's already installed.

                      Maybe can someone give me a list of required components for Qt? I have a feeling I'm missing something there, as there are many options.

                      jsulmJ 1 Reply Last reply
                      0
                      • S Shahar Klinger

                        Thanks Nick, it's already installed.

                        Maybe can someone give me a list of required components for Qt? I have a feeling I'm missing something there, as there are many options.

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        @Shahar-Klinger Did you check this introduction: http://doc.qt.io/qt-5/androidgs.html

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        S 1 Reply Last reply
                        0
                        • jsulmJ jsulm

                          @Shahar-Klinger Did you check this introduction: http://doc.qt.io/qt-5/androidgs.html

                          S Offline
                          S Offline
                          Shahar Klinger
                          wrote on last edited by
                          #12

                          @jsulm Yes, that was one of the first docs I read. One line that troubles me is "2. Select the components you need in the Select Components screen and click Next.".

                          Maybe I didn't install all the required components, or there is some problem with those I selected?

                          jsulmJ 1 Reply Last reply
                          0
                          • S Shahar Klinger

                            @jsulm Yes, that was one of the first docs I read. One line that troubles me is "2. Select the components you need in the Select Components screen and click Next.".

                            Maybe I didn't install all the required components, or there is some problem with those I selected?

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #13

                            @Shahar-Klinger Which components did you install?

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              Shahar Klinger
                              wrote on last edited by
                              #14

                              The Qt components I installed, as listed in the Maintenance Tool, are as follows:

                              Qt 5.7.0:

                              • msvc2013 64-bit
                              • Android x86
                              • Android ARMv7
                              • Other Qt components (Charts, Data Visualization etc.)

                              Tools:

                              • MinGW 5.3.0

                              Thanks!

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                Shahar Klinger
                                wrote on last edited by
                                #15

                                So I just had a breakthrough, that resulted in the application showing up on my phone.
                                After building the project in Qt, I go to the build directory in a command line prompt, and type:

                                mingw32-make install INSTALL_ROOT=.\Deploy
                                androiddeployqt --output .\Deploy --install --input android-libcalqlatr.so-deployment-settings.json
                                

                                And lo and behold, the application is installed on the device.
                                Why doesn't Qt Creator do this automatically?

                                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