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. Can't run Qt app on physical mobile device
Qt 6.11 is out! See what's new in the release blog

Can't run Qt app on physical mobile device

Scheduled Pinned Locked Moved Solved Mobile and Embedded
9 Posts 4 Posters 2.2k Views 2 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.
  • nooneN Offline
    nooneN Offline
    noone
    wrote on last edited by
    #1

    Hi All,

    I am trying to build and run Qt app on andoid .seems likes it's building but I am not able to cheack it as it wont run . When I try to compile it , It compiles fine but when I try to run it , it wont run and I get this error:-

    Cannot find the android build step.
    Error while building/deploying project calqlatr (kit: Android for armeabi-v7a (GCC 4.9, Qt  (android_armv7)))
    When executing step "Deploy to Android device"
    

    I had also post this on stack-overflow . here is the link:- https://stackoverflow.com/questions/50434018/cant-run-android-app-in-qtcreator?noredirect=1#comment87888043_50434018

    I am new to qt and specially to android

    I am using arch Linux

    1 Reply Last reply
    0
    • nooneN Offline
      nooneN Offline
      noone
      wrote on last edited by
      #9

      I solved it by removing ~/.config/QtProject/ which deleted configuration and reinstalling qt for android using online installer . it seems like my installation was corrupted

      1 Reply Last reply
      0
      • QjayQ Offline
        QjayQ Offline
        Qjay
        wrote on last edited by
        #2

        @noone said in Can't run Qt app on physical mobile device:

        Error while building/deploying project calqlatr (kit: Android for armeabi-v7a (GCC 4.9, Qt (android_armv7)))
        When executing step "Deploy to Android device

        hey have you properly setup your Qt SDK, NDK and apache ant ?? . also if you compile your project the apk can also be found in build directory of your project .

        something like this
        /home/whatever_name/build-app-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7_c6c308-Release/android-build/bin/

        1 Reply Last reply
        1
        • nooneN Offline
          nooneN Offline
          noone
          wrote on last edited by noone
          #3

          I have set up everything including jdk,SDK and NDK. I have installed apache-ant by

          sudo pacman -S apache-ant
          

          Here is the screenshot:-

          alt text

          Also there is no android-build/bin folder in build directory :-

          here is what I all have in build directory :-

          % tree
          .
          ├── android-libcalqlatr.so-deployment-settings.json
          ├── libcalqlatr.so
          ├── main.o
          ├── Makefile
          ├── qrc_calqlatr.cpp
          ├── qrc_calqlatr.o
          ├── qrc_shared.cpp
          └── qrc_shared.o
          
          0 directories, 8 files
          

          Also I have setup all Android NDK environment variables.

          % cat /etc/environment 
          #
          # This file is parsed by pam_env module
          #
          # Syntax: simple "KEY=VAL" pairs on separate lines
          #
          JAVA_HOME=/usr/lib/jvm/default
          JRE_HOME=/usr/lib/jvm/default-runtime
          
          PATH=/home/jimbo/bin:/home/jimbo/.local/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/cordova/bin:/opt/AndroidSDK/tools/bin:/opt/AndroidNDK
          
          QT_QPA_PLATFORMTHEME=qt5ct
          
          RUSTUP_HOME=/opt/Rust
          CARGO_HOME=/opt/Rust/.cargo
          PKG_CONFIG_PATH=/bin/pkg-config
          
          ANDROID_HOME=/opt/AndroidSDK
          
          ANDROID_NDK=/opt/AndroidNDK
          ANDROID_NDK_ROOT=/opt/AndroidNDK
          ANDROID_NDK_HOME=/opt/AndroidNDK
          
          1 Reply Last reply
          0
          • nooneN Offline
            nooneN Offline
            noone
            wrote on last edited by
            #4

            Also everything works under Android studio. I can build and create android apps and run them on my physical device in android studio

            1 Reply Last reply
            0
            • BlasterB Offline
              BlasterB Offline
              Blaster
              wrote on last edited by
              #5

              Did you activate the USB Debug mode in the physical phone?
              Do you have the phone drivers installed?

              nooneN 1 Reply Last reply
              0
              • BlasterB Blaster

                Did you activate the USB Debug mode in the physical phone?
                Do you have the phone drivers installed?

                nooneN Offline
                nooneN Offline
                noone
                wrote on last edited by
                #6

                @Blaster

                @Blaster said in Can't run Qt app on physical mobile device:

                Did you activate the USB Debug mode in the physical phone?

                Yes.

                Do you have the phone drivers installed?

                No. Its runs perfectly with android studio .

                I also had armv7a emulator image which works in android studio. In qt-Creator , it didn't event ask me to run app in emulator .

                1 Reply Last reply
                0
                • QjayQ Offline
                  QjayQ Offline
                  Qjay
                  wrote on last edited by
                  #7

                  i am not sure what's the problem but here is my setup and it works perfectly fine . Maybe you can try this one out :)

                  1. using Qt5.10.0 ( offline installer)

                  2. i have created a qt_android folder : all the SDK and NDK and apache ant resides here.
                    0_1526997111352_1.png

                  3. my qt creator settings
                    0_1526997244370_2.png

                  ..
                  0_1526997255342_3.png

                  1. also have you ran android sdk manager atleast once ?? to get the necessary tools .

                  2. try to build a sample example provided by Qt itself .

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kuzulis
                    Qt Champions 2020
                    wrote on last edited by
                    #8

                    Hi, as I remember, I had same issue, see https://bugreports.qt.io/browse/QTCREATORBUG-20088 and I fixed that (see my link).

                    1 Reply Last reply
                    0
                    • nooneN Offline
                      nooneN Offline
                      noone
                      wrote on last edited by
                      #9

                      I solved it by removing ~/.config/QtProject/ which deleted configuration and reinstalling qt for android using online installer . it seems like my installation was corrupted

                      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