I have been trying to deploy a simple Qt application to android but with no luck. Details are as follows
Qt Version : Qt 5.1.0 for Android (Windows 32-bit) downloaded from here
Qt Creator version : Qt Creator 2.7.2
I have set the following options in Qt Creator
Android configurations
Android SDK location : C:\adt-bundle-windows-x86-20130717\adt-bundle-windows-x86-20130717\sdk
Android NDK location : C:\android-ndk-r8e
Ant location : C:\Program Files\Java\jdk1.7.0_25
AVD name : AndroidAVD (API Level 17,armeabi-v7a)
Kit Configuration
Name of the kit : Android for arm(GCC 4.4.3,Qt 5.1.0)(default)
Device type : Android
Device : Run on Android
Sysroot : Its empty
Compiler : GCC (arm 4.4.3 )
Android GDB Server : C:\android-ndk-r8e\prebuilt\android-arm\gdbserver
Debugger : C:\android-ndk-r8e\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\arm-linux-androideabi-gdb.exe
Qt Version : 5.1.0 (android_armv7)(C:\Qt\Qt5.1.0\5.1.0\android_armv7\bin\qmake.exe)
Deploy configuration of the Kit(for both Release and Debug) : Deploy local Qt libraries and Use Local Qt libraries option is checked
OS : Windows 7 64 bit
The Problem
When I try to build,everything builds fine. I get libTheTestApp.so in my build directory.
Also the project directory now contains a folder named "android" containing the manifest file and some other files.
When I try to Run the app, the emulator starts but I can't find my app. If I close my emulator and return to Qt Creator I get the following error
Please wait, searching for a suitable device for target:android-17.
Error while building/deploying project TheTestApp (kit: Android for arm (GCC 4.4.3, Qt 5.1.0))
When executing step 'Deploy to Android device'
If I do "adb devices" while the emulator is running, I get the id of the running emulator
Also I tried searching the internet before posting this question here. I found this link.
My question is how do I deploy a Qt5 application to an android device? Are there any links which say how to do it? I am asking this because I have followed the instructions provided in Qt5ForAndroidBuilding link while building the app.
Thanks for your time.
I was successfully able to deploy a simple QT application to my android device. From what I understand ,Qt creator first tries to deploy the app to a device if it finds one. If no device is found, it tries to launch an AVD and deploys the application to the emulator.
"Please wait, searching for a suitable device for target:android-17." Try targeting a lower api level by changing it in Projects->Selected Toolkit -> Run -> Package Configuartion -> Manifest
And also , make sure that the Ant location points to InstallLocation\ant\bin\ant.bat
Video Build and deploy Qt apps to Android using Qt 5.1 on Windows http://www.youtube.com/watch?v=_nkhlhBwkjk.
For people who will see this post in the future:
Do not launch avd from Qt Creator, first run the avd from android sdk manager
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With