clang path wrong in build command being generated
-
Hi,
I just did a clean install of QT after a few months away from my project: Windows 10, QT creator 4.9.1, Android ArmV7 5.12.4, JDK 1.8, Android SDK 23 (6.0 marshmallow).I am now trying to compile a project which was ok under 5.9. After a clean, running rebuild gives me this:
16:33:37: Running steps for project CityZenMobileUser... 16:33:37: Starting: "C:\Qt\5.12.4\android_armv7\bin\qmake.exe" C:\CityZen\cityzen-mobile\CityZenMobileUser.pro -spec android-clang "CONFIG+=debug" "CONFIG+=qml_debug" Project ERROR: Cannot run target compiler 'C:\Android\android-ndk-r10e/toolchains/llvm/prebuilt/windows/bin/clang++'. Output: =================== =================== Maybe you forgot to setup the environment? 16:33:37: The process "C:\Qt\5.12.4\android_armv7\bin\qmake.exe" exited with code 3. Error while building/deploying project CityZenMobileUser (kit: Android for armeabi-v7a (Clang Qt 5.12.4 for Android ARMv7)) When executing step "qmake" 16:33:37: Elapsed time: 00:00.
Which cannot work, as there is no 'C:\Android\android-ndk-r10e/toolchains/llvm' folder.
The proper path is:
C:\Android\android-ndk-r10e\toolchains\llvm-3.6\prebuilt\windows\bin\Under creator, in Tools/Options/Kits/Compilers/, all clang compilers point to the proper folder (llvm-3.6).
I installed all Android related packages using the latest version of Android Studio.I don't really see who is generating this wrong path, any pointers on where to look?
Thanks!
-
OK, I've been stuck on this for a few days now, ready for another clean start. Can anyone point me to:
- an up to date tutorial on how to install Qt for Andoid dev on windows (targetting a LTS release, if possible 5.12, or 5.9 if not possible)
- or a table clearly spelling which version of SDK, JDK, NDK etc... is known to work with these versions of Qt
I've never had much luck working from the official install instructions, there was always an important piece of the puzzle missing, or a bad link to 3rd party package etc... Am I targetting the wrong platform, would things be simpler (dependencies &co) if I was trying this in a Linux environment?
Thanks in advance, any help appreciated :-)
-
@gomgom Did you check https://doc.qt.io/qt-5/android-getting-started.html ?
It says for Qt 5.12 you can use latest NDK/SDK. -
hi @gomgom
since 5.12 your Target SDK for android has to be r18 or newer, since qt makes use of clang support and that was only added in r18
So 5.12 or newer -> r18 or newer
5.11 or older on the other hand won't work with r18 or newer for those you have to use an older sdk.
Be careful, I remember an other user recently posting issues with 20c, So you might want to avoid that one.
-
Thanks for the answers. It took me a while to figure out that the JDK has to be rev 1.8. By then, I had also reverted the NDK to r10e which I thought was a safe bet (seemed to support clang, and I indeed saw some warnings concerning rev 20).
For others, the following seems to work for me:
JDK 1.8 (https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
NDK r19c (https://developer.android.com/ndk/downloads/older_releases.html)
SDK 23 (6.0 marshmallow, which I need to support...)
QT creator 4.9.1, Android ArmV7 5.12.4I'm back on track, thanks for your help!