Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
correct Android SDK and NDK to be used with Qt 5.12.1?
I would like to know what is the correct Android SDK and NDK to be used with Qt 5.12.1.
I am having issues compiling and I think is a sdk/qt miss match problem.
Did you already check with https://doc.qt.io/qt-5/android-getting-started.html ?
biskero last edited by biskero
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
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)
I just reinstalled everything using Android Studio and have same results.
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.
biskero last edited by biskero
@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.
Then I would try with the NDK 18 since 19 is giving your trouble.
@SGaist same story!
what is the official Qt / Android SDK match?
@SGaist ok thx.
making some progress installing the latest qmake from android.
Previous error not showing, now on others.
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.
Eddy last edited by
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 I don't think a bug report is necessary. If you follow the instruction/hints in the docu, you should be fine:
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.
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.
TripleF last edited by
I have filed a bug report for the NDK version that was used to built a Qt release to be better documented. Votes welcome:
assam last edited by assam
Note that this has been documented properly in the patch in https://bugreports.qt.io/browse/QTBUG-81752.
- 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.