How to build Qt5 for Android?

后端 未结 2 959
暖寄归人
暖寄归人 2021-02-07 23:19

I have a server running Ubuntu 12.04 LTS.

I would like to put the server to use building Qt5 for the Android ARMv6 platform. How does one go about doing this on a headle

2条回答
  •  无人及你
    2021-02-07 23:49

    I don't mean to respond to another answer with an answer but this is my first post :-( and I think that that prevents me from posting this in a comment. (so consider it a citation of said answer, not a reply to it) Nathan's own answer above didn't work exactly for me.

    My configure line looked more like so:

    ./configure \
    -developer-build -platform linux-g++-64 \
    -xplatform android-g++ \
    -nomake tests \
    -nomake examples \
    -android-ndk /opt/qt5-android/android-ndk-r8e \
    -android-sdk /opt/qt5-android/android-sdk-linux \
    -skip qttools \
    -skip qttranslations \
    -skip qtwebkit \
    -skip qtserialport \
    -android-ndk-host linux-x86_64
    

    Here's why:

    • -skip qtwebkit-examples-and-demos caused an error in configure... It didn't like that I was skipping something that couldn't be built anyway (sorry, I lost the exact error message)

    • -android-ndk-host linux-x86_64 stopped configure from aborting with " Can not detect the android host. Please use -android-ndk-host option to specify one"

    • -platform linux-g++-64 is me being paranoid about whether or not configure will add the -m64 flag or whatever when working its magic for me

    Other than this difference, Nathan's procedure seemed to work like a charm. My local environment building now (thanks for the tips, Mr Osman :-)

提交回复
热议问题