Android (arm64-v8a)

  • Hello

    Arm64-v8a architecture is getting more and more popular on Android devices. I searched but couldn't even find a good tutorial to compile it myself. Is there anything out there to help me get going?


  • Lifetime Qt Champion


    You have information and links to information about that here.

  • @SGaist
    i am building up android arm64-v8a from source code,
    but i have problem about configure setting,
    i use the option -prefix {path} []
    and it did installed in {path} perfectly, but i want to use the arm64-v8a lib at different location or even difference computer,
    the qt creator show error :
    Cannot read {path}/mkspecs/android-g++/qmake.conf: No such file or directory
    when i put arm64-v8a to other position: ~/Qt/qt5/arm64-v8a and add qmake in qt creator
    but it always got errors, and point to prefix {path}

    Is there any solution about this?
    or should i remove -prefix option

    btw, i am using mac

  • Lifetime Qt Champion


    Do you mean you are moving your Qt installation around on your computer ?

  • @SGaist
    yes, you are right.
    but i got it, there is a file named qt.conf in android_armv7a/bin
    i used it in android_arm64-v8a/bin/qt.conf as well, and it worked.

    in qt.conf, i placed this then i could move it to anywhere

    Prefix: ..

    and below was how i built the library

    git clone git:// qt5
    cd qt5
    perl init-repository
    ./configure \
    -confirm-license \
    -opensource \
    -xplatform android-g++ \
    -nomake tests \
    -nomake examples \
    -android-ndk /usr/local/Cellar/android-ndk/r10e \
    -android-sdk ~/Documents/android-sdk-macosx \
    -android-ndk-host darwin-x86_64 \
    -android-toolchain-version 4.9 \
    -android-arch arm64-v8a \
    -android-ndk-platform android-21 \
    -skip qtdeclarative \
    -skip qttranslations \
    -skip qtserialport \
    -no-warnings-are-errors \
    -no-compile-examples \
    -no-sql-mysql \
    -no-sql-psql \
    -prefix ~/Documents/Qt/android_arm64-v8a \
    -prefix-install \
    -openssl \
    -I /usr/local/Cellar/openssl/1.0.2k/include -L /usr/local/Cellar/openssl/1.0.2k/lib
    make -j4
    make -j4 install

  • i upload my build artifact in github:

    anyone can skip build and download to use it

  • @love8879201 Hello, with what can I say that I can have a simile and compile my codes on my cell phone? Because it has arm64-v8a and it does not let me

  • @love8879201 Why do you use darwin library to compile qt for android?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.