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

Windows 10 for Android Project



  • I develop a C++ project and want this project to run in Android. I use QT Creator 4.3.1, Window 10, Android Studio 3.2 (Mainly for setup the Android SDK tools and build tools).

    So after I setup JDK location, Android SDK and NDK location in Tools > Options > Devices > Android. And check Autmotically create kits for Android tool chains. Then I check Build & Run > Kits, but I cannot find the auto-detected kits there. Why QT Creator can't create the auto-detected kits?

    So I add a new kit for Android. The settings as picture below.
    0_1538022511563_QtCreator_Build&Run_KitsSettings_2.png

    I get the compiler from
    ...\ndk-bundle\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64\bin

    When building the project I get "Cannot find the android build step." Error. When executing step "Deploy to Android device". Where can I change the step to set to an Android device?


  • Moderators

    Clang is not yet supported by Qt for Android, you need to use gcc.

    I suggest you update your Qt Creator and try adding NDK/SDK again to see if it will generate the kits automatically then.

    Also, make sure you have Qt for Android installed - check your Qt Maintenance Tool.



  • @sierdzio If I use MinGW 5.3.0 for the compiler I get different compilation error. Can I use MinGW? The error I get is "Project ERROR: Unknown module(s) in QT: webenginewidgets". How to remove this error? I've tried changing *.pro file, add a line Qt+=webenginewidgets, but still getting same error.

    I already install QT with webenginewidgets module. I also install QT to support Android.


  • Moderators

    You have to use the cross-compiler from Android NDK.



  • @sierdzio Is there any guidance on how to do cross-compiling on Android?


  • Moderators

    @roscoe_x said in Windows 10 for Android Project:

    @sierdzio Is there any guidance on how to do cross-compiling on Android?

    Yes, with Qt it's very simple.

    1. Install Java.
    2. Install Android SDK.
    3. Install Android NDK.
    4. Install Qt.
    5. Set up Qt Creator for Android development.
    6. Compile & run your apps - same way as on any other platform.

    Qt does all the heavy lifting for you.



  • I have found the problem. The auto-detect kits function only works using NDK 10, while before I was using NDK 18. So after selecting the kits, the project can be built. But this problem is hard to detect because there's no useful information.


Log in to reply