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 deploy qt desktop application to android
Forum Update on Monday, May 27th 2025

How to deploy qt desktop application to android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 3 Posters 2.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.
  • R Offline
    R Offline
    Requiem
    wrote on 23 Feb 2016, 09:36 last edited by
    #1

    Hello friends.I built an application (https://github.com/cryptoclubber/cryptoclub/blob/master/CryptoClub-qt.pro) as they indicated in their .doc for Win, Mac and Linux, but not for mobile devices as android. I have built and tested environment QT5 (hello world) and operates smoothly. What is the path I have to change to point to the compiler in the .pro? thanks in advance.

    TEMPLATE = app
    TARGET = CryptoClub-qt
    VERSION = 1.0.0
    INCLUDEPATH += src src/json src/qt
    DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE HAVE_CXX_STDHEADERS MINIUPNP_STATICLIB
    CONFIG += no_include_pwd
    CONFIG += thread
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    lessThan(QT_MAJOR_VERSION, 5): CONFIG += static
    QMAKE_CXXFLAGS = -fpermissive

    greaterThan(QT_MAJOR_VERSION, 4) {
    QT += widgets
    DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
    }

    win32 {
    BOOST_LIB_SUFFIX=-mgw49-mt-s-1_55
    BOOST_INCLUDE_PATH=C:/deps/boost_1_55_0
    BOOST_LIB_PATH=C:/deps/boost_1_55_0/stage/lib
    BDB_INCLUDE_PATH=C:/deps/db-4.8.30.NC/build_unix
    BDB_LIB_PATH=C:/deps/db-4.8.30.NC/build_unix
    OPENSSL_INCLUDE_PATH=C:/deps/openssl-1.0.1h/include
    OPENSSL_LIB_PATH=C:/deps/openssl-1.0.1h
    }

    Divergent thinking
    https://www.youtube.com/watch?v=Z78aaeJR8no&feature=related
    How to escape education's death valley
    https://youtu.be/7Pi1ntZ1riA

    1 Reply Last reply
    0
    • S Offline
      S Offline
      stackprogramer
      wrote on 23 Feb 2016, 11:02 last edited by stackprogramer
      #2

      some app when is developed are dependency in a platform. so for creating your app for new platform you should override dependency or delete these dependency and replaced new methods that are acceptable for android platform.

      1 Reply Last reply
      1
      • R Offline
        R Offline
        Requiem
        wrote on 23 Feb 2016, 12:53 last edited by
        #3

        Thanks a lot!
        I looked makefile on my "hello world" Now I have to think how to make to target path and flags.

        Any clue or suggestion is welcome, it's my first contact with the android platform

        Thanks in advance :)

        Divergent thinking
        https://www.youtube.com/watch?v=Z78aaeJR8no&feature=related
        How to escape education's death valley
        https://youtu.be/7Pi1ntZ1riA

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 23 Feb 2016, 13:36 last edited by
          #4

          First of all you need NDK. Then install Qt for Android using the Maintenance tool. Then in QtCreator under Options/Android you need to provide all needed paths. Then you should have a Kit for Android (if not create one). Use this Kit to build your app for Android.

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

          R 1 Reply Last reply 23 Feb 2016, 15:28
          1
          • J jsulm
            23 Feb 2016, 13:36

            First of all you need NDK. Then install Qt for Android using the Maintenance tool. Then in QtCreator under Options/Android you need to provide all needed paths. Then you should have a Kit for Android (if not create one). Use this Kit to build your app for Android.

            R Offline
            R Offline
            Requiem
            wrote on 23 Feb 2016, 15:28 last edited by
            #5

            @jsulm So correctly configured?
            https://gyazo.com/a4f0bd0358e1961c4e7a3ad0a3d1a98a
            add environment variables?
            https://gyazo.com/50cd4a64291e5bf8c3c57d72dd1c396e

            Thanks in advance

            Divergent thinking
            https://www.youtube.com/watch?v=Z78aaeJR8no&feature=related
            How to escape education's death valley
            https://youtu.be/7Pi1ntZ1riA

            S J 2 Replies Last reply 23 Feb 2016, 16:35
            0
            • R Requiem
              23 Feb 2016, 15:28

              @jsulm So correctly configured?
              https://gyazo.com/a4f0bd0358e1961c4e7a3ad0a3d1a98a
              add environment variables?
              https://gyazo.com/50cd4a64291e5bf8c3c57d72dd1c396e

              Thanks in advance

              S Offline
              S Offline
              stackprogramer
              wrote on 23 Feb 2016, 16:35 last edited by stackprogramer
              #6

              @Requiem

              you need
              -java-jdk,
              -apache-ant,
              -sdk android ;
              -NDK
              go tools->option (menu)
              select anndroid:
              you should determine path of top tools:
              please see image
              http://www.mediafire.com/view/gigkpwo0r70b94i/configQtandroid.png#
              for more info see
              http://blog.rhesoft.com/2014/05/11/tutorial-how-to-use-qt-creator-for-mobile-development-android/

              R 1 Reply Last reply 24 Feb 2016, 10:43
              1
              • R Requiem
                23 Feb 2016, 15:28

                @jsulm So correctly configured?
                https://gyazo.com/a4f0bd0358e1961c4e7a3ad0a3d1a98a
                add environment variables?
                https://gyazo.com/50cd4a64291e5bf8c3c57d72dd1c396e

                Thanks in advance

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 24 Feb 2016, 05:21 last edited by
                #7

                @Requiem Looks good. Did you check whether QtCreator created a Kit for Android? If so you already should be able to build. Under Devices you should be able to add an Android device (please consider: select the same architecture you installed - armeabi-v7a).

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

                1 Reply Last reply
                1
                • R Offline
                  R Offline
                  Requiem
                  wrote on 24 Feb 2016, 10:36 last edited by
                  #8

                  It seems that the environment is correct, it builds "hello world" without problem. My problem is that I only worked on Qt with command lines and pointing all dependencies to a folder in C: ... with a couple of instructions and changes build headers and compile the code. When I find mistakes, I can look in the code or google, but in this case not find repository or guide for this compilation android, just like building environment and hello world.
                  Thank you very much for your help

                  Divergent thinking
                  https://www.youtube.com/watch?v=Z78aaeJR8no&feature=related
                  How to escape education's death valley
                  https://youtu.be/7Pi1ntZ1riA

                  1 Reply Last reply
                  0
                  • S stackprogramer
                    23 Feb 2016, 16:35

                    @Requiem

                    you need
                    -java-jdk,
                    -apache-ant,
                    -sdk android ;
                    -NDK
                    go tools->option (menu)
                    select anndroid:
                    you should determine path of top tools:
                    please see image
                    http://www.mediafire.com/view/gigkpwo0r70b94i/configQtandroid.png#
                    for more info see
                    http://blog.rhesoft.com/2014/05/11/tutorial-how-to-use-qt-creator-for-mobile-development-android/

                    R Offline
                    R Offline
                    Requiem
                    wrote on 24 Feb 2016, 10:43 last edited by
                    #9

                    @stackprogramer said:

                    @Requiem

                    you need
                    -java-jdk,
                    -apache-ant,
                    -sdk android ;
                    -NDK
                    go tools->option (menu)
                    select anndroid:
                    you should determine path of top tools:
                    please see image
                    http://www.mediafire.com/view/gigkpwo0r70b94i/configQtandroid.png#
                    for more info see
                    http://blog.rhesoft.com/2014/05/11/tutorial-how-to-use-qt-creator-for-mobile-development-android/

                    Thanks for the guide.. ^^ This guy is a machine programming :O I need a friend such as he is.... lol !!

                    Cheers

                    Divergent thinking
                    https://www.youtube.com/watch?v=Z78aaeJR8no&feature=related
                    How to escape education's death valley
                    https://youtu.be/7Pi1ntZ1riA

                    1 Reply Last reply
                    0
                    • R Offline
                      R Offline
                      Requiem
                      wrote on 25 Feb 2016, 09:30 last edited by Requiem
                      #10

                      Hello friends

                      QT += core gui network
                      android:QT += androidextras

                      ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android

                      greaterThan(QT_MAJOR_VERSION, 4) {
                      QT += widgets
                      DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
                      }

                      TEMPLATE = app
                      TARGET = mycodetest-qt
                      VERSION = 0.0.1
                      INCLUDEPATH += src src/json src/qt
                      DEFINES += ( I´m STUCK HERE :S )

                      android:DEFINES += (And here stuck again)

                      CONFIG += no_include_pwd
                      CONFIG += thread
                      android:DEPSDIR=/android/arm-gcc-4.8

                      and the problem for "where i put the deps files"...

                      android:BOOST_LIB_SUFFIX=-gcc-mt-1_55
                      android:BOOST_INCLUDE_PATH=$$DEPSDIR/include
                      android:BOOST_LIB_PATH=$$DEPSDIR/lib....bla bla bla the same for all deps...

                      Now....Defines += i tried putting all algorithms , but i get errors .... For the rest, quite happy that I get compilation errors, that is a good way !! :)

                      Divergent thinking
                      https://www.youtube.com/watch?v=Z78aaeJR8no&feature=related
                      How to escape education's death valley
                      https://youtu.be/7Pi1ntZ1riA

                      1 Reply Last reply
                      0

                      2/10

                      23 Feb 2016, 11:02

                      topic:navigator.unread, 8
                      • Login

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