Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[Solved] Qt Creator: Linux host, Android target - no compiler can produce code for this Qt version.
I cloned the qt repository and built it for android following the wiki. In Qt Creator, I tried to choose the newly built Qt version and got "No compiler can produce...".
But I have been using Qt Creator to build an android app with a binary installed version of Qt 5.3.1 for android, so I think the correct compiler is visible: Android GCC (arm 4.8).
When I choose the installed 'Qt 5.3 for Android armv7', the details show ABI 'arm-linux-android-elf-32bit', but when I choose the Qt that I built 'Qt 5.3.2 (qt5)' it shows ABI 'arm-linux-generic-elf-32bit'. Is that the problem? I interpret that to mean it is built for 'generic linux' on ARM eabi instead of for 'android hack of linux' on the ARM eabi.
To build Qt 5.3.2 I used this command:
@./configure -xplatform android-g++ -nomake tests -nomake examples -android-ndk /home/bootch/android-ndk-r10 -android-sdk /home/bootch/android-sdk-linux -android-ndk-host linux-x86 -android-toolchain-version 4.8 -android-ndk-platform android-19 -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -skip qtdeclarative -skip qtmultimedia -no-warnings-are-errors -v@
Do I need '-developer-build'?
I also tried '-android-ndk-platform android-10' (thinking that should be the ndk release number) but I think the configure script reported that as invalid.
I also futzed around in Qt Creator trying to add a kit, with similar problems.
This is on Ubuntu 14.04 using Qt Creator 3.1.2.
(My real goal is to harness plugins/platforms/android/androidjnimain.cpp with log stmts to logcat so I might find why my hello_android app is quietly dying on Android. )
More or less solved: I added -developer-build and changed android-19 to android-14 and a few other changes, and now Qt Creator will add my built version of Qt without complaining "No compiler...". That doesn't explain WHY it works now.
@./configure -android-toolchain-version 4.8 -android-ndk-host linux-x86 -developer-build -xplatform android-g++ -nomake tests -nomake examples -android-ndk /home/bootch/android-ndk-r10 -android-sdk /home/bootch/android-sdk-linux -android-ndk-platform android-14 -skip qttools -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -skip qtdeclarative -skip qtmultimedia -no-warnings-are-errors -v@
IIRC, there where some levels of the NDK needed (at least 14). I wonder if that might have an influence here
Yes, that seems on the right track. IIRC the instructions say something like 'you need API-9 and API-14 to build Qt, but you then can build an app to any API.' I guess I was confusing the two notions, that I should build Qt to some lower API than I am deploying my app?
I don't remember the details for the specific lower level API need. You should ask this on the android-development mailing list or the necessitas IRC channel