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. correct Android SDK and NDK to be used with Qt 5.12.1?

correct Android SDK and NDK to be used with Qt 5.12.1?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
15 Posts 7 Posters 7.8k 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.
  • B Offline
    B Offline
    biskero
    wrote on 23 Feb 2019, 17:16 last edited by biskero
    #3

    yes I did but I still cannot compile!
    "For Qt 5.12 or later, use the latest available version of NDK with android-clang toolchain."
    I have the latest.

    I am getting the same error:
    ../../../../Qt/5.12.1/android_armv7/include/QtCore/qglobal.h:45:12: fatal error: 'type_traits' file not found

    include <type_traits>

    compiling on macOS Qt Creator 4.8.1 Based on Qt 5.12.0 (Clang 10.0 (Apple), 64 bit)

    This is my env for Android and Java:
    Android settings are OK. (SDK Version: 26.1.1, NDK Version: 19.1.5304403)
    /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
    Qt 5.12.1

    I just reinstalled everything using Android Studio and have same results.
    Any idea?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 23 Feb 2019, 21:02 last edited by
      #4

      Hi,

      From what I read in several posts as well as personal experience, Android Studio is usually the culprit. You should rather install the command line version of the SDK directly.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      B 1 Reply Last reply 23 Feb 2019, 22:10
      0
      • S SGaist
        23 Feb 2019, 21:02

        Hi,

        From what I read in several posts as well as personal experience, Android Studio is usually the culprit. You should rather install the command line version of the SDK directly.

        B Offline
        B Offline
        biskero
        wrote on 23 Feb 2019, 22:10 last edited by biskero
        #5

        @SGaist that's what I had before, SDK and NDK downloaded via manager since I had it for couple of years and never used the Android studio, but I had the same error.

        So not sure what is going on.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 23 Feb 2019, 22:13 last edited by
          #6

          Then I would try with the NDK 18 since 19 is giving your trouble.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          B 1 Reply Last reply 23 Feb 2019, 22:27
          0
          • S SGaist
            23 Feb 2019, 22:13

            Then I would try with the NDK 18 since 19 is giving your trouble.

            B Offline
            B Offline
            biskero
            wrote on 23 Feb 2019, 22:27 last edited by
            #7

            @SGaist same story!

            what is the official Qt / Android SDK match?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 23 Feb 2019, 22:41 last edited by
              #8

              The position is given in the Android Getting Started guide linked by @koahnig. Taking into account that NDK updates have a tendency to break things and not only for Qt.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              B 1 Reply Last reply 23 Feb 2019, 23:06
              0
              • S SGaist
                23 Feb 2019, 22:41

                The position is given in the Android Getting Started guide linked by @koahnig. Taking into account that NDK updates have a tendency to break things and not only for Qt.

                B Offline
                B Offline
                biskero
                wrote on 23 Feb 2019, 23:06 last edited by
                #9

                @SGaist ok thx.

                making some progress installing the latest qmake from android.
                Previous error not showing, now on others.
                Making progress!
                Thx

                K 1 Reply Last reply 24 Feb 2019, 08:19
                0
                • B biskero
                  23 Feb 2019, 23:06

                  @SGaist ok thx.

                  making some progress installing the latest qmake from android.
                  Previous error not showing, now on others.
                  Making progress!
                  Thx

                  K Offline
                  K Offline
                  koahnig
                  wrote on 24 Feb 2019, 08:19 last edited by
                  #10

                  @biskero

                  0_1550995775812_6b71831a-3ea6-4db7-bb8b-2fcee01417bd-image.png

                  This is the combination of SDK and NDK which can compile on windows 10 for version Qt5.12.0. It was at least at the time of installation the most recent combination (shortly after release of 5.12.0).

                  Just compiled an example program and started on Huawei P10 and it works.

                  Vote the answer(s) that helped you to solve your issue(s)

                  1 Reply Last reply
                  0
                  • E Offline
                    E Offline
                    Eddy
                    wrote on 18 Mar 2019, 10:14 last edited by
                    #11

                    Hi,

                    In my case :
                    (SDK Version: 25.2.5, NDK Version: 10.4.0)
                    Works on Qt5,11,1

                    But not on qt5,12,0 or 5,12,2

                    Did you guys make a bugreport for this?
                    If so, I can add this info to the bug report. Maybe it can help to pinpoint the issue.

                    Eddy

                    Qt Certified Specialist
                    www.edalsolutions.be

                    J.HilkJ 1 Reply Last reply 18 Mar 2019, 10:30
                    1
                    • E Eddy
                      18 Mar 2019, 10:14

                      Hi,

                      In my case :
                      (SDK Version: 25.2.5, NDK Version: 10.4.0)
                      Works on Qt5,11,1

                      But not on qt5,12,0 or 5,12,2

                      Did you guys make a bugreport for this?
                      If so, I can add this info to the bug report. Maybe it can help to pinpoint the issue.

                      Eddy

                      J.HilkJ Online
                      J.HilkJ Online
                      J.Hilk
                      Moderators
                      wrote on 18 Mar 2019, 10:30 last edited by
                      #12

                      @Eddy I don't think a bug report is necessary. If you follow the instruction/hints in the docu, you should be fine:

                      https://doc.qt.io/qt-5/android-getting-started.html#installing-the-prerequisites

                      In order to use Qt for Android, you need the following:
                      
                      The Android SDK Tools
                      Note: If your Qt version is earlier than v5.9, use the SDK tools package v25.2.5 or earlier.
                      
                      The Android NDK
                      Note: Using Qt for Android with the GCC toolchain requires Android NDK version r10e. For Qt 5.12 or later, use the latest available version of NDK with android-clang toolchain.
                      
                      Java SE Development Kit (JDK) v6 or later. You can also use OpenJDK on Linux.
                      
                      

                      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                      Q: What's that?
                      A: It's blue light.
                      Q: What does it do?
                      A: It turns blue.

                      K 1 Reply Last reply 18 Mar 2019, 11:15
                      1
                      • J.HilkJ J.Hilk
                        18 Mar 2019, 10:30

                        @Eddy I don't think a bug report is necessary. If you follow the instruction/hints in the docu, you should be fine:

                        https://doc.qt.io/qt-5/android-getting-started.html#installing-the-prerequisites

                        In order to use Qt for Android, you need the following:
                        
                        The Android SDK Tools
                        Note: If your Qt version is earlier than v5.9, use the SDK tools package v25.2.5 or earlier.
                        
                        The Android NDK
                        Note: Using Qt for Android with the GCC toolchain requires Android NDK version r10e. For Qt 5.12 or later, use the latest available version of NDK with android-clang toolchain.
                        
                        Java SE Development Kit (JDK) v6 or later. You can also use OpenJDK on Linux.
                        
                        
                        K Offline
                        K Offline
                        koahnig
                        wrote on 18 Mar 2019, 11:15 last edited by
                        #13

                        @J.Hilk @Eddy

                        I agree also that basically it is in the prerequisites.
                        However IMHO it is dangerous to have such an ambiguos statement as latest available version of NDK in the document. It might be true for the moment, but may change any time.

                        Therefore, I am positing the actual versions I am currently using.

                        Vote the answer(s) that helped you to solve your issue(s)

                        1 Reply Last reply
                        0
                        • T Offline
                          T Offline
                          TripleF
                          wrote on 30 Jan 2020, 08:34 last edited by
                          #14

                          I have filed a bug report for the NDK version that was used to built a Qt release to be better documented. Votes welcome:
                          https://bugreports.qt.io/browse/QTBUG-81752

                          1 Reply Last reply
                          1
                          • A Offline
                            A Offline
                            assam
                            wrote on 13 Mar 2020, 08:28 last edited by assam
                            #15

                            Note that this has been documented properly in the patch in https://bugreports.qt.io/browse/QTBUG-81752.

                            Mainly:

                            • Qt 5.11 and below use NDK r10e with GCC toolchain.
                            • Qt 5.12.0 to 5.12.5 and Qt 5.13.0 to 5.13.1, use NDK r19c with android-clang toolchain
                            • Qt 5.14+, Qt 5.13.2+ and Qt 5.12.6+ use NDK r20b or r21 with android-clang toolchain

                            Also, NDK selection should be automatic starting from Qt Creator 4.12, so you won't need to worry about this then.

                            1 Reply Last reply
                            4

                            • Login

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