Deploying android applications Qt 5.1
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-20130717adt-bundle-windows-x86-20130717sdk
Android NDK location : C:android-ndk-r8e
Ant location : C:Program FilesJavajdk1.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-r8eprebuiltandroid-armgdbserver
Debugger : C:android-ndk-r8etoolchainsarm-linux-androideabi-4.4.3prebuiltwindowsbinarm-linux-androideabi-gdb.exe
Qt Version : 5.1.0 (android_armv7)(C:QtQt5.1.05.1.0android_armv7binqmake.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 InstallLocationantbinant.bat
视频在Windows上使用Qt 5.1构建和部署Qt应用程序到Android 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
上一篇: 无法在PyQt5中导入QtWebKitWidgets
下一篇: 部署Android应用程序Qt 5.1