Skip to content
Advertisement

Qt for Android on Mac or Linux build “Can not detect ndk toolchain…”

I have just installed SDK, NDK, JDK. When I type in Terminal:

moroz@moroz:~/qt/qt5$ ./configure -developer-build -opensource -confirm-license -xplatform android-g++ -nomake tests -nomake examples -android-ndk android-ndk-r9/ -android-sdk android-sdk-linux/ -android-ndk-host linux-x86_64 -android-toolchain-version 4.8 -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples

Then

moroz@moroz:~/qt/qt5$ /home/moroz/qt/qt5/qtbase/configure -top-level -developer-build -opensource -confirm-license -xplatform android-g++ -nomake tests -nomake examples -android-ndk android-ndk-r9/ -android-sdk android-sdk-linux/ -android-ndk-host linux-x86_64 -android-toolchain-version 4.8 -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples

I got the follwoing error:

Can not detect Android NDK toolchain. Please use -android-toolchain-version to specify

And there is the same message on Mac and Ubuntu!

Advertisement

Answer

on a mac you should use

-android-ndk-host darwin-x86_64

it resolvs -android-ndk-host in ndkfolder/prebuilt/ (I have darwin-x86_x64, android-arm, android-mips, android-x86, common)

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement