I have downloaded qt creator 5.1 and saw that you have a option to make android apps...so i have downloaded the last android sdk and ndk version...went to tools-options-android and put the location of the sdk and ndk.When i put the ndk qt gave me a warnning:qt versions for arhitectures mips,arm,x86 are missing.The android emulator is working fine...but when i made a hello world app to test it...i press run...qt creator start building the app... the emulator shown up working fine...but qt gave an error:No such file or directory as stdlib.h .If i erase include another error that string.h or limits.h are missing and a lot of other libs...and i think this may be because of those qt arhitactures missing....but i don't know where to get them from...i have the standard qt not the entreprise.
-
You mean Qt 5.1, not QtCreator 5.1, right? Have you downloaded and installed Qt 5.* for Android from http://qt-project.org/downloads ? – Nejat Aug 02 '14 at 13:21
-
yes qt 5.1...sorry...and yes i have downloaded qt 5 for android too..but the same thing happens... – user3494120 Aug 02 '14 at 14:29
1 Answers
After downloading and installing the Android SDK and NDK, I think you need to open the SDK manager (SDK Manager.exe or something like that) and download from here the toolchains (ARMv7 gcc) and APIs corresponding to the Android devices you are targetting (API 17 for 4.2, API 19 for 4.4....). I don't think they are installed automatically when you download and install the SDK.
Then, install Qt for Android (I'm using 5.2.1, but I recommend 5.3.1 which has Bluetooth support), open QtCreator and make it point to your SDK, NDK and ANT folders.
Settings variables like ANDROID_NDK_ROOT ANT_HOME, JAVA_HOME does not seem to be required....but it could help...;-)
This worked for me with no problem.
You can find tutos on the web, for example: http://www.jjoe64.com/2014/03/tutorial-qt-for-android-set-up-sdk-and.html
Hope this helps.

- 20,821
- 10
- 70
- 151
-
i've done all of this but no work..it seems these libraries like string.h,stdlib.h,and others are missing...i will try later to run my app directly to my phone and not thru the emulator...maybe it will work.. – user3494120 Aug 02 '14 at 14:45
-
If it cannot find string.h you won't be able to compile anything. Using emulator or real device does not change a lot for compilation. IT changes runtime only. Do you have a compiler installed (Visual Studio or MinGW)? Probably you need to have one, accept MinGW upon Qt installation to try. – jpo38 Aug 02 '14 at 19:04
-
i know that...i have both mingw and vs 2013 installed...but no luck – user3494120 Aug 02 '14 at 19:11
-
Check if string.h/stdlib.h are present somewhere in the NDK folder. You can try to manually add the folder to the include path (http://stackoverflow.com/questions/2752352/how-to-add-include-path-in-qt-creator) and see if it fixes the problem (even if you're not supposed to do that, it may help figuring out if includes are the only problem you have... – jpo38 Aug 02 '14 at 20:29
-
Also, check there is no other g++/gcc executable accessible in your PATH, (from cygwin for instance), maybe Qt is not using the good compiler. Finally, do not change Qt folder upon install (let it go to c:/Qt/5.1), I already experienced problems when changing that. – jpo38 Aug 02 '14 at 20:31
-
ok so i copied the libs where they supposed to be but now i have another problem..there are like 215 undeclared things like ::log,::log10,::pow and so on...in the file thay all have using ::log for example...how should i fix that? – user3494120 Aug 02 '14 at 20:52