Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt Creator and Android NDK



  • Hello,

    I got an issue with setting the Android NDK and kit creation.
    Qt Creator 4.11.2 doesn't create the Android tool chains correctly here when NDK 10e is selected.

    bd612247-a812-4d1a-bff3-d968d7328166-image.png

    There's no error but the tool chains have no compiler set even after restarting Qt Creator. The compiler is actually missing and not detected.

    Since I have no idea which compiler to set up, what could be the reason for this?



  • @Padlock

    Possibly you require an earlier SDK version. SDK 26.1.1 is quite recent compared to NDK 10.4.0.

    Also is the Qt version really as old as NDK 10.4.0?



  • Qt version is 5.11.3. I haven't changed the SDK since I did the very same but with most likely some previous version of Qt Creator.



  • Taking the information at https://doc.qt.io/qt-5/android-getting-started.html would mean SDK and NDK versions should both be correct.



  • @Padlock said in Qt Creator and Android NDK:

    Taking the information at https://doc.qt.io/qt-5/android-getting-started.html would mean SDK and NDK versions should both be correct.

    Yes, I was just checking this.

    I do not remember what I had used with ndk 10e, possibly sdk 23.something. I have changed the clang versions and I would try to get sdk and ndk version release dates closer together. Just for minimizing issues.

    Currently I am using Qt5.12.7 with the appropriate ndk. That works for me.
    With Qt5.14.1 I had issues but apparently it messed up during installation. However others seem to be fine also with 5.14.



  • This might be a very silly question but how do I change the SDK version?



  • @Padlock

    I installed AndroidStudio which has SDK Manager under tools. That's what I am using. IIRC I have seen or even used a stand-alone SDK manager. That's for windows.

    The sdk is installed under AppData/local which I copy to another disk for keeping track of versions. However, I might be too cautious.



  • Yes, the SDK is installed there but I was under the impression that that folder contains many different SDKs. I got several installed. But how would I tell Qt Creator which one to use?



  • @Padlock

    under platforms there seem to be the different sdk versions, if I am not mistaken. At least that matches API levels I have installed.



  • Do you mean SDK Platforms in Android Studio?
    This matches my configuration too with one exception.
    But how do I tell Qt Creator which one of those to use?



  • I think this page (https://doc.qt.io/qtcreator/creator-developing-android.html) is supposed to contain this information but I can't find anything.



  • Sorry beyond my experience.

    in qt creator Options->Devices->Android at the bottom there is also avd and sdk manager, but you cannot change there.
    The only possible way I see at the moment would be deinstalling and just leave the last which is ackward.

    However, I am guy trying to stay with something that works. Sometimes testing with switching between different versions forth and back. It drove me nuts that a simple update in AndroidStudio killed essentially my toolchains.

    As explained above, I have copied the Android stuff onto a separate disk. Unfortunately Qt creator is not helpful enough in changing toolchains for Android, but I think the true reason is Android where they think that one has to use the latest versions.

    That is what I am using at the moment:
    97ef4a60-bb87-4ed1-9b6f-7d57d88086b6-image.png

    I have another set of folders for Qt5.14.1. I know that I have duplicated a lot there, but I got my toolchains finally to work. That's what counts. Renaming 2 folders under devices and I have the other toolchain. It is stupid, but works.

    BTW Qt5.12.1 and Qt5.12.7 may use the same sdk and ndk.



  • Thanks for your suggestion. I'll probably end up doing the same unless we overlooked something and there is another way to feed Qt Creator with the desired SDK version. I still haven't given up hope that it's not that complicated. ;-)



  • @Padlock said in Qt Creator and Android NDK:

    Thanks for your suggestion. I'll probably end up doing the same unless we overlooked something and there is another way to feed Qt Creator with the desired SDK version. I still haven't given up hope that it's not that complicated. ;-)

    I am very happy getting proofed wrong. ;)



  • I don't know if there's another way but yours surely worked for me. Thanks a lot!


Log in to reply