Important: Please read the Qt Code of Conduct -

need help patching Qt 5.12.0 Android

  • Qt Champions 2016

    there's a bug freezing Android Apps in Qt 5.12.0:
    fortunately there's also a fix:

    Now I want to patch my Qt Installation (5.12.0, installed on macOS for Android, iOS, macOS)

    Nearly 2 yrs ago J-P Nurmi helped me with scripts to patch QtQuickControls2:

    If I understand it right, this should work ?
    clone from branch 5.12 is OK ?
    my installation is 5.12.0

    export ANDROID_NDK_ROOT=/your_path_to/android-ndk-r18b
    cd /your-path-to-cloned-repo_android
    git clone --branch 5.12 git://
    cd qtbase
    git fetch refs/changes/16/246816/2 && git cherry-pick FETCH_HEAD
    make install

    hope this works
    thx for some feedback before ruining my installation ;-)

  • Lifetime Qt Champion

    hi @ekkescorner,

    the mentioned patch is submitted to branch 5.12 (and will appear in 5.12.1 release).

    So if you checkout 5.12 or 5.12.1 branch now, it is already contained and you dont need to cherry-pick.

    I'm only on the phone now, so its hard to review all the commands.

    but you can check the generated libs befor make install ;)


  • Qt Champions 2016

    @aha_1980 thx.
    I'll remove the cherry-pick cmd.
    will try it out tomorrow

  • Qt Champions 2016

    @aha_1980 so this is my script to patch my binary QT 5.12.0 installation:

    export ANDROID_NDK_ROOT=/your_path_to/android-ndk-r18b
    cd /your-path-to-cloned-repo_android
    git clone --branch 5.12.1 git://
    cd qtbase

    got an error from qmake: Project ERROR: target architecture detection binary not found
    this is the output of Terminal:

    iMac:qtbase admin$ my_path_to_sdk_5.12.0/5.12.0/android_armv7/bin/qmake
    Info: creating stash file my_path_to_repo/qtbase/.qmake.stash
    Info: creating cache file my_path_to_repo/qtbase/.qmake.cache
    Selecting Qt Edition.
    Type 'c' if you want to use the Commercial Edition.
    Type 'o' if you want to use the Open Source Edition.
    Which edition of Qt do you want to use? c
    This is the Qt Commercial Edition.
    You are licensed to use this software under the terms of
    Type '?' to view the QT LICENSE AGREEMENT.
    Type 'y' to accept this license offer.
    Type 'n' to decline this license offer.
    Do you accept the terms of the license? y
    Running configuration tests...
    Checking for gold linker... no
    Checking for valid makespec... yes
    Checking for target architecture... Project ERROR: target architecture detection binary not found.

    any ideas what's missing ?

  • Qt Champions 2017

    From what I could tell you didn't run configure to create the qmake and detection tools. If you run qmake prebuilt it'd try to find the relevant scripts/libraries in the location where they were when it was built. Try getting a clean source tree (since you're building from git) and then running configure to create qmake (which will incidentally also run it for you and prepare the build) and then run make.

    See here for lengthy instructions on building and specifically for android here.

  • Qt Champions 2016

    @kshegunov thx for the hints, but I'm a mobile business app developer and really not a cmdline-guy ;-)
    only using pre-built Qt binaries and doing all my stuff from inside QtC

    because 2 yrs ago (with some help by J-P Nurmi) I did something similar to patch qtquickcontrols2 Qt 5.8 for Android and iOS, I thought it would be easy to do something similar for Qt 5.12 qtbase Android.

    ... will probably wait for 5.12.1 ;-)

Log in to reply