Building QT 6.3.0 for Android on Windows with C++20

An example of how it can be configured:

set "CMAKE_ROOT=E:\PFiles\cmake-3.21.3-windows-x86_64\bin"
set "NINJA_ROOT=E:\PFiles\ninja-win"
set "JDK_ROOT=C:\Program Files\Java\jdk1.8.0_301\bin"
set "MINGW_ROOT=E:\PFiles\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin"
set "PERL_ROOT=E:\PFiles\Strawberry\perl\bin"
       
set PATH=C:\WINDOWS\system32;C:\WINDOWS
set PATH=%CMAKE_ROOT%;%PATH%
set PATH=%NINJA_ROOT%;%PATH%
set PATH=%JDK_ROOT%;%PATH%
set PATH=%MINGW_ROOT%;%PATH%
set PATH=%PERL_ROOT%;%PATH%
set PATH=E:\PFiles\Python35;%PATH%
         
rem Check if the tools are in PATH
where gcc
where mingw32-make.exe
where perl.exe
where javac.exe
where python.exe
where cmake.exe
where ninja.exe
      
set "ANDROID_SDK_ROOT=C:\Users\D-Ef\AppData\Local\Android\Sdk"
set "ANDROID_NDK_PATH=C:\Users\D-Ef\AppData\Local\Android\Sdk\ndk\24.0.8215888"
set "ANDROID_BUILD_TOOLS_REVISION=31.0.0"
set "ANDROID_BUILD_ABI=x86_64"
rem set "ANDROID_BUILD_ABI=x86"
rem set "ANDROID_BUILD_ABI=arm64-v8a"
rem set "ANDROID_BUILD_ABI=armeabi-v7a"

set MY_INSTALL_PATH=E:/Qt/Qt6.3.0/android.%ANDROID_BUILD_ABI%
set QT_HOST_PATH=E:/Qt/Qt6.3.0/windows
      
configure.bat -platform win32-msvc -xplatform android-clang -prefix %MY_INSTALL_PATH% -qt-host-path %QT_HOST_PATH% ^
  -c++std c++20 -no-openssl ^
  -DQT_NO_EXCEPTIONS=1 -release -force-debug-info -opensource -confirm-license ^
  -android-sdk %ANDROID_SDK_ROOT% -android-ndk %ANDROID_NDK_PATH% -android-ndk-platform android-23 -android-abis %ANDROID_BUILD_ABI% ^
  -skip qt3d -skip qt5compat -skip qtactiveqt -skip qtcharts -skip qtcoap -skip qtconnectivity ^
  -skip qtdatavis3d -skip qtdoc -skip qtlottie -skip qtmqtt -skip qtnetworkauth -skip qtopcua ^
  -skip qtserialport -skip qtpositioning -skip qtquicktimeline -skip qtquick3d -skip qtremoteobjects ^
  -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtvirtualkeyboard -skip qtwayland ^
  -skip qtwebchannel -skip qtwebengine -skip qtwebview

E:/Qt/Qt6.3.0/windows is the directory where it was previously built for Windows.

It prints the following:

+ cd qtbase
+ E:\repos\qt-everywhere-src-6.3.0\qtbase\configure.bat -top-level -platform win32-msvc -xplatform android-clang -prefix E:/Qt/Qt6.3.0/android.x86_64 -qt-host-path E:/Qt/Qt6.3.0/windows   -c++std c++20 -no-openssl   -DQT_NO_EXCEPTIONS=1 -release -force-debug-info -opensource -confirm-license   -android-sdk C:\Users\D-Ef\AppData\Local\Android\Sdk -android-ndk C:\Users\D-Ef\AppData\Local\Android\Sdk\ndk\24.0.8215888 -android-ndk-platform android-23 -android-abis arm64-v8a   -skip qt3d -skip qt5compat -skip qtactiveqt -skip qtcharts -skip qtcoap -skip qtconnectivity   -skip qtdatavis3d -skip qtdoc -skip qtlottie -skip qtmqtt -skip qtnetworkauth -skip qtopcua   -skip qtserialport -skip qtpositioning -skip qtquicktimeline -skip qtquick3d -skip qtremoteobjects   -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtvirtualkeyboard -skip qtwayland   -skip qtwebchannel -skip qtwebengine -skip qtwebview
-- Windows 10 SDK version:
'E:/PFiles/cmake-3.21.3-windows-x86_64/bin/cmake.exe' '-DQT_HOST_PATH=E:/Qt/Qt6.3.0/windows' '-DBUILD_qt3d=OFF' '-DBUILD_qt5compat=OFF' '-DBUILD_qtactiveqt=OFF' '-DBUILD_qtcharts=OFF' '-DBUILD_qtcoap=OFF' '-DBUILD_qtconnectivity=OFF' '-DBUILD_qtdatavis3d=OFF' '-DBUILD_qtdoc=OFF' '-DBUILD_qtlottie=OFF' '-DBUILD_qtmqtt=OFF' '-DBUILD_qtnetworkauth=OFF' '-DBUILD_qtopcua=OFF' '-DBUILD_qtserialport=OFF' '-DBUILD_qtpositioning=OFF' '-DBUILD_qtquicktimeline=OFF' '-DBUILD_qtquick3d=OFF' '-DBUILD_qtremoteobjects=OFF' '-DBUILD_qtscxml=OFF' '-DBUILD_qtsensors=OFF' '-DBUILD_qtserialbus=OFF' '-DBUILD_qtvirtualkeyboard=OFF' '-DBUILD_qtwayland=OFF' '-DBUILD_qtwebchannel=OFF' '-DBUILD_qtwebengine=OFF' '-DBUILD_qtwebview=OFF' '-DCMAKE_INSTALL_PREFIX=E:/Qt/Qt6.3.0/android.x86_64' '-DQT_QMAKE_TARGET_MKSPEC=win32-msvc' '-DQT_QMAKE_TARGET_MKSPEC=android-clang' '-DCMAKE_C_COMPILER=cl' '-DCMAKE_CXX_COMPILER=cl' '-DANDROID_SDK_ROOT=C:/Users/D-Ef/AppData/Local/Android/Sdk' '-DANDROID_NDK_ROOT=C:/Users/D-Ef/AppData/Local/Android/Sdk/ndk/24.0.8215888' '-DANDROID_PLATFORM=android-23' '-DANDROID_ABI=arm64-v8a' '-DCMAKE_BUILD_TYPE=RelWithDebInfo' '-DQT_EXTRA_DEFINES=QT_NO_EXCEPTIONS=1' '-DINPUT_cxx14=yes' '-DINPUT_cxx17=yes' '-DINPUT_cxx20=yes' '-DINPUT_openssl=no' '-G' 'Ninja' 'E:/repos/qt-everywhere-src-6.3.0'
-- Android toolchain file within NDK detected: C:/Users/D-Ef/AppData/Local/Android/Sdk/ndk/24.0.8215888/build/cmake/android.toolchain.cmake
-- Android build detected, checking configuration defaults...
-- Android: Targeting API '23' with architecture 'arm64', ABI 'arm64-v8a', and processor 'aarch64'
-- Android: Selected unified Clang toolchain
-- The CXX compiler identification is Clang 14.0.1
-- The C compiler identification is Clang 14.0.1
-- The ASM compiler identification is Clang
-- Found assembler: C:/Users/D-Ef/AppData/Local/Android/Sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Users/D-Ef/AppData/Local/Android/Sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/D-Ef/AppData/Local/Android/Sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
Checking dependencies of 'qtbase'
Checking dependencies of 'qtshadertools'
Checking dependencies of 'qtsvg'
Checking dependencies of 'qtlanguageserver'
Checking dependencies of 'qtimageformats'
Checking dependencies of 'qtdeclarative'
Checking dependencies of 'qtmultimedia'
Checking dependencies of 'qttools'
Skipping optional dependency 'qtactiveqt' of 'qttools', because building 'qtactiveqt' was explicitly disabled.
Checking dependencies of 'qttranslations'
Checking dependencies of 'qtwebsockets'
Configuring 'qtbase'
-- Could NOT find double-conversion (missing: double-conversion_DIR)
-- Could NOT find md4c (missing: md4c_DIR)
-- Could NOT find double-conversion (missing: double-conversion_DIR)
-- Could NOT find md4c (missing: md4c_DIR)
Configuring 'qtshadertools'
Configuring 'qtsvg'
Configuring 'qtlanguageserver'
Configuring 'qtimageformats'
Configuring 'qtdeclarative'
Configuring 'qtmultimedia'
Configuring 'qt3d'
Configuring 'qt5compat'
Configuring 'qtactiveqt'
Configuring 'qtcharts'
Configuring 'qtcoap'
Configuring 'qtconnectivity'
Configuring 'qtdatavis3d'
Configuring 'qttools'
-- Could NOT find Clang (missing: Clang_DIR)
-- Could NOT find Clang (missing: Clang_DIR)
QtDesigner: WARNING: E:/repos/qt-everywhere-src-6.3.0/qttools/src/designer/src/lib/uilib/formbuilder.h includes abstractformbuilder.h when it should include QtDesigner/abstractformbuilder.h
Configuring 'qtdoc'
Configuring 'qtlottie'
Configuring 'qtmqtt'
Configuring 'qtnetworkauth'
Configuring 'qtopcua'
Configuring 'qtserialport'
Configuring 'qtpositioning'
Configuring 'qtquicktimeline'
Configuring 'qtquick3d'
Configuring 'qtremoteobjects'
Configuring 'qtscxml'
Configuring 'qtsensors'
Configuring 'qtserialbus'
Configuring 'qttranslations'
CMake Warning at qttranslations/translations/CMakeLists.txt:37 (message):
  Directory
  'E:/repos/qt-everywhere-src-6.3.0/qttranslations/translations/../../qtlocation/src'
  for qtlocation does not exist.  Skipping...
Call Stack (most recent call first):
  qttranslations/translations/CMakeLists.txt:105 (add_ts_targets)


CMake Warning at qttranslations/translations/CMakeLists.txt:44 (message):
  No source files located for qtlocation, skipping target creation
Call Stack (most recent call first):
  qttranslations/translations/CMakeLists.txt:105 (add_ts_targets)


Configuring 'qtvirtualkeyboard'
Configuring 'qtwayland'
Configuring 'qtwebsockets'
Configuring 'qtwebchannel'
Configuring 'qtwebengine'
Configuring 'qtwebview'
-- The following packages have been found:

 * QtBuildInternals
 * WrapZLIB (required version >= 1.0.8)
 * WrapPCRE2
 * WrapRt
 * WrapHarfbuzz
 * WrapPNG
 * WrapFreetype
 * ZLIB
 * WrapJpeg
 * Qt6Concurrent (required version >= 6.3.0)
 * Python
 * Qt6Svg (required version >= 6.3.0)
 * Qt6QuickTemplates2Private (required version >= 6.3.0)
 * Qt6QuickControls2 (required version >= 6.3.0)
 * Qt6ShaderToolsTools (required version >= 6.3.0)
 * Qt6ShaderTools
 * Qt6Xml (required version >= 6.3.0)
 * Qt6WidgetsTools (required version >= 6.3.0)
 * Qt6Widgets (required version >= 6.3.0)
 * Qt6OpenGLPrivate (required version >= 6.3.0)
 * Qt6QuickWidgets (required version >= 6.3.0)
 * Qt6Sql (required version >= 6.3.0)
 * Qt6PrintSupport (required version >= 6.3.0)
 * Qt6OpenGLWidgets (required version >= 6.3.0)
 * Qt6ToolsTools (required version >= 6.3.0)
 * Qt6LinguistTools (required version >= 6.3.0)
 * Qt6Linguist (required version >= 6.3.0)
 * Qt6BuildInternals (required version >= 6.3.0)
 * WrapAtomic
 * Qt6CoreTools (required version >= 6.3.0)
 * Qt6Core (required version >= 6.3.0)
 * Qt6Network (required version >= 6.3.0)
 * EGL, A platform-agnostic mechanism for creating rendering surfaces for use with other graphics libraries, such as OpenGL|ES and OpenVG., <https://www.khronos.org/egl/>
 * GLESv2
 * Qt6Gui (required version >= 6.3.0)
 * Qt6QmlModels (required version >= 6.3.0)
 * WrapVulkanHeaders
 * Qt6OpenGL (required version >= 6.3.0)
 * Qt6Quick (required version >= 6.3.0)
 * Qt6Test (required version >= 6.3.0)
 * Threads
 * Qt6QmlTools (required version >= 6.3.0)
 * Qt6QmlPrivate (required version >= 6.3.0)
 * Qt6QuickTest (required version >= 6.3.0)
 * Qt6 (required version >= 6.3.0)
 * Qt6HostInfo
 * Java (required version >= 1.8)

-- The following OPTIONAL packages have not been found:

 * zstd
 * WrapZSTD (required version >= 1.3), ZSTD compression library, <https://github.com/facebook/zstd>
 * DBus1 (required version >= 1.2)
 * WrapDBus1 (required version >= 1.2)
 * Libudev
 * Vulkan
 * Backtrace
 * WrapBacktrace
 * double-conversion
 * WrapDoubleConversion
 * ICU
 * Libsystemd
 * Libb2
 * PCRE2 (required version >= 10.20)
 * WrapSystemPCRE2 (required version >= 10.20)
 * Slog2
 * unofficial-brotli
 * WrapBrotli
 * Libproxy
 * OpenSSL
 * WrapOpenSSLHeaders
 * WrapOpenSSL
 * GSSAPI, Generic Security Services Application Program Interface
 * X11_XCB, A compatibility library for code that translates Xlib API calls into XCB calls, <http://xorg.freedesktop.org/>
 * ATSPI2
 * DirectFB
 * Libdrm, Userspace interface to kernel DRM services., <https://wiki.freedesktop.org/dri/>
 * Freetype (required version >= 2.2.0)
 * WrapSystemFreetype (required version >= 2.2.0)
 * Fontconfig
 * gbm, Mesa gbm library., <http://www.mesa3d.org>
 * harfbuzz (required version >= 2.6.0)
 * WrapSystemHarfbuzz (required version >= 2.6.0)
 * WrapSystemJpeg
 * md4c
 * WrapSystemMd4c
 * PNG
 * WrapSystemPNG
 * OpenGL
 * WrapOpenGL
 * GTK3 (required version >= 3.6)
 * Libinput, Library to handle input devices in Wayland compositors and to provide a generic X.Org input driver., <http://www.freedesktop.org/wiki/Software/libinput/>
 * XKB, XKB API common to servers and clients., <http://xkbcommon.org>
 * Tslib
 * Mtdev
 * Cups
 * DB2, IBM DB2 client library, <https://www.ibm.com>
 * MySQL, MySQL client library, <https://www.mysql.com>
 * PostgreSQL
 * Oracle, Oracle client library, <https://www.oracle.com>
 * ODBC
 * SQLite3
 * Interbase, Interbase client library, <https://www.embarcadero.com/products/interbase>
 * JPEG
 * Jasper
 * WrapJasper
 * TIFF
 * WebP
 * WrapWebP
 * Libmng
 * Qt6LanguageServer (required version >= 6.3.0)
 * LTTngUST
 * ALSA
 * AVFoundation
 * GLIB2, Event loop and utility library, <https://wiki.gnome.org/Projects/GLib>
 * GObject
 * GStreamer
 * PulseAudio
 * WrapPulseAudio
 * WMF
 * Qt6DBus (required version >= 6.3.0)
 * Clang
 * WrapLibClang (required version >= 8)
 * litehtml
 * PkgConfig
 * Qt6QmlCompilerPlusPrivate

-- Configure summary:

Building for: android-clang (arm64, CPU features: neon)
Compiler: clang 14.0.1
Build options:
  Mode ................................... release (with debug info)
  Optimize release build for size ........ no
  Fully optimize release builds (-O3) .... no
  Building shared libraries .............. yes
  Using C standard ....................... C11
  Using C++ standard ..................... C++20
  Using ccache ........................... no
  Relocatable ............................ yes
  Using precompiled headers .............. yes
  Using LTCG ............................. no
  Target compiler supports:
    Intrinsics without compiler architecture option  yes
    Extensions ........................... NEON
  Sanitizers:
    Addresses ............................ no
    Threads .............................. no
    Memory ............................... no
    Fuzzer (instrumentation only) ........ no
    Undefined ............................ no
  Build parts ............................ libs
  App store compliance ................... yes
Qt modules and options:
  Qt Concurrent .......................... yes
  Qt D-Bus ............................... no
  Qt D-Bus directly linked to libdbus .... no
  Qt Gui ................................. yes
  Qt Network ............................. yes
  Qt PrintSupport ........................ yes
  Qt Sql ................................. yes
  Qt Testlib ............................. yes
  Qt Widgets ............................. yes
  Qt Xml ................................. yes
Support enabled for:
  Using pkg-config ....................... no
  udev ................................... no
  Using system zlib ...................... yes
  Zstandard support ...................... no
  Thread support ......................... yes
Common build options:
  Linker can resolve circular dependencies  yes
Qt Core:
  backtrace .............................. no
  DoubleConversion ....................... yes
    Using system DoubleConversion ........ no
  GLib ................................... no
  ICU .................................... no
  Using system libb2 ..................... no
  Built-in copy of the MIME database ..... yes
  cpp/winrt base ......................... no
  Tracing backend ........................ <none>
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  PCRE2 .................................. yes
    Using system PCRE2 ................... no
Qt Sql:
  SQL item models ........................ yes
Qt Network:
  getifaddrs() ........................... no
  IPv6 ifname ............................ no
  libproxy ............................... no
  OpenSSL ................................ no
    Qt directly linked to OpenSSL ........ no
  OpenSSL 1.1 ............................ no
  DTLS ................................... no
  OCSP-stapling .......................... no
  SCTP ................................... no
  Use system proxies ..................... yes
  GSSAPI ................................. no
  Brotli Decompression Support ........... no
Core tools:
  Android deployment tool ................ no
  macOS deployment tool .................. no
  Windows deployment tool ................ no
  qmake .................................. yes
Qt Gui:
  Accessibility .......................... yes
  FreeType ............................... yes
    Using system FreeType ................ no
  HarfBuzz ............................... yes
    Using system HarfBuzz ................ no
  Fontconfig ............................. no
  Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
      Using system libjpeg ............... no
    PNG .................................. yes
      Using system libpng ................ no
  Text formats:
    HtmlParser ........................... yes
    CssParser ............................ yes
    OdfWriter ............................ yes
    MarkdownReader ....................... yes
      Using system libmd4c ............... no
    MarkdownWriter ....................... yes
  EGL .................................... yes
  OpenVG ................................. no
  OpenGL:
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ yes
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    OpenGL ES 3.2 ........................ no
  Vulkan ................................. yes
  Session Management ..................... yes
Features used by QPA backends:
  evdev .................................. yes
  libinput ............................... no
  HiRes wheel support in libinput ........ no
  INTEGRITY HID .......................... no
  mtdev .................................. no
  tslib .................................. no
  xkbcommon .............................. no
  X11 specific:
    XLib ................................. no
    XCB Xlib ............................. no
    EGL on X11 ........................... no
    xkbcommon-x11 ........................ no
    xcb-sm ............................... no
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. no
  EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS RCAR ........................... no
    EGLFS EGLDevice ...................... no
    EGLFS GBM ............................ no
    EGLFS VSP2 ........................... no
    EGLFS
Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGLFS X11 ............................ no
  LinuxFB ................................ no
  VNC .................................... no
  VK_KHR_display ......................... no
  QNX:
    lgmon ................................ no
    IMF .................................. no
  XCB:
    Using system-provided xcb-xinput ..... no
    GL integrations:
      GLX Plugin ......................... no
        XCB GLX .......................... no
      EGL-X11 Plugin ..................... no
  Windows:
    Direct 2D ............................ no
    Direct 2D 1.1 ........................ no
    DirectWrite .......................... no
    DirectWrite 3 ........................ no
Qt Widgets:
  GTK+ ................................... no
  Styles ................................. Fusion Windows Android
Qt Testlib:
  Tester for item models ................. yes
Qt PrintSupport:
  CUPS ................................... no
Qt SqlWARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
Either set CMAKE_PREFIX_PATH or LLVM_INSTALL_DIR to the location of your llvm installation.
 Drivers:
  DB2 (IBM) .............................. no
  InterBase .............................. no
  MySql .................................. no
  OCI (Oracle) ........................... no
  ODBC ................................... no
  PostgreSQL ............................. no
  SQLite ................................. yes
    Using system provided SQLite ......... no
Further Image Formats:
  JasPer ................................. no
  MNG .................................... no
  TIFF ................................... yes
    Using system libtiff ................. no
  WEBP ................................... yes
    Using system libwebp ................. no
Qt QML:
  QML network support .................... yes
  QML debugging and profiling support .... yes
  QML just-in-time compiler .............. no
  QML sequence object .................... yes
  QML XML http request ................... yes
  QML Locale ............................. yes
Qt QML Models:
  QML list model .......................On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution.
On macOS, you can use Homebrew's llvm package.
You will also need to set the FEATURE_clang CMake variable to ON to re-evaluate this check.
WARNING: Clang-based lupdate parser will not be available. LLVM and Clang C++ libraries have not been found.
You will need to set the FEATURE_clangcpp CMake variable to ON to re-evaluate this check.

.. yes
  QML delegate model ..................... yes
Qt Quick:
  AnimatedImage item ..................... yes
  Canvas item ............................ yes
  Support for Qt Quick Designer .......... yes
  Flipable item .......................... yes
  GridView item .......................... yes
  ListView item .......................... yes
  TableView item ......................... yes
  TreeView item .......................... yes
  Path support ........................... yes
  PathView item .......................... yes
  Positioner items ....................... yes
  Repeater item .......................... yes
  ShaderEffect item ...................... yes
  Sprite item ............................ yes
Qt Quick Templates 2:
  Hover support .......................... yes
  Multi-touch support .................... yes
  Calendar support ....................... yes
Qt Quick Controls 2:
  Styles ................................. Basic Fusion Imagine Material Universal macOS Windows
Qt Multimedia:
  GStreamer 1.0 .......................... no
  Video for Linux ........................ yes
  Linux DMA buffer support ............... no
  MMRenderer ............................. no
  AVFoundation ........................... no
  Windows Media Foundation ............... no
Qt Tools:
  Qt Assistant ........................... yes
  QDoc ................................... no
  Clang-based lupdate parser ............. no
  Qt Designer ............................ yes
  Qt Distance Field Generator ............ yes
  Qt Linguist ............................ yes
  pixeltool .............................. yes
  qdbus .................................. no
  Qt Attributions Scanner ................ yes
  qtdiag ................................. no
  qtplugininfo ........................... no
-- Qt is now configured for building. Just run 'cmake --build . --parallel'

Once everything is built, you must run 'cmake --install .'
Qt will be installed into 'E:/Qt/Qt6.3.0/android.x86_64'

To configure and build other Qt modules, you can use the following convenience script:
        E:/Qt/Qt6.3.0/android.x86_64/bin/qt-configure-module.bat

If reconfiguration fails for some reason, try removing 'CMakeCache.txt' from the build directory

-- Configuring done
-- Generating done
-- Build files have been written to: E:/repos/qt-everywhere-src-6.3.0

Then it builds and installs with the following commands:

cmake --build . --parallel
cmake --install .

When I tried to build my app with NDK 24.0.8215888 I got:

C:/Users/D-Ef/AppData/Local/Android/Sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/windows-x86_64/bin\llvm-readobj.exe: error: unknown argument '--libs'

I did not figure out what does it mean and rebuilt QT with

set "ANDROID_NDK_PATH=C:\Users\D-Ef\AppData\Local\Android\Sdk\ndk\22.1.7171670"

And left %SystemDrive%\Documents and Settings\%USERNAME%\Application Data\QtProject\qtcreator\android\sdk_definitions.json unchanged:

{
    "common": {
        "sdk_tools_url": {
            "linux": "https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip",
            "linux_sha256": "89f308315e041c93a37a79e0627c47f21d5c5edbe5e80ea8dc0aac8a649e0e92",
            "windows": "https://dl.google.com/android/repository/commandlinetools-win-6609375_latest.zip",
            "windows_sha256": "40bba20275180194bebf89bb58c74d712bb93cc401f36bd2f8f32383acf9826c",
            "mac": "https://dl.google.com/android/repository/commandlinetools-mac-6609375_latest.zip",
            "mac_sha256": "2c3822db1c916655223e5ee8ce0fbf6b73d0b99012045c9dc8eaa6a5736c0c55"
        },
        "sdk_essential_packages": {
            "default": ["platform-tools", "platforms;android-31", "cmdline-tools;latest"],
            "linux": [],
            "mac": [],
            "windows": ["extras;google;usb_driver"]
        }
    },
    "specific_qt_versions": [
        {
            "versions": ["default"],
            "sdk_essential_packages": ["build-tools;31.0.0", "ndk;22.1.7171670"],
            "ndk_path": "ndk/22.1.7171670"
        },
        {
            "versions": ["5.12.[0-5]", "5.13.[0-1]"],
            "sdk_essential_packages": ["build-tools;28.0.2", "ndk;19.2.5345600"],
            "ndk_path": "ndk/19.2.5345600"
        }
    ]
}

Leave a Reply

Your email address will not be published.