Windows Qt5.2 for Android development environment configuration
1. Download and install QT 5.2.0 for Android (Windows 32-bit) http://qt-project.org/downloads
2. Open QT Creator, open Help, enter Android, find the official instructions, follow the steps of the tutorial step by step.
3. You need to download the following four software first:
1) The Android SDK Tools download installation
2) The Android NDK download and unzip, note that there can be no spaces
3) Apache Ant v1.8 or later download and unzip, ditto
4) OpenJDK V6 or later download and unzip
4. Open qt Creator, select Tools-Options-android, configure the file path just installed, and click "Launch Android AVD Manager"
5. Click New to create a new Android emulator, select device according to your needs
6. Click on the Ok-ok and select the device you just created, click Start, this process is slow, wait patiently.
Recommendation: Real machine development, will speed up development
7. Restart QT Creator already has the device, we check the build and run build suite and QT version is correct.
Check the component kit:
If the debugger is none, you also need to add a debugger to add the interface such as:
Will%pwd\android-ndk-r9b\toolchains\arm-linux-androideabi-4.8\prebuilt\windows\bin\ Arm-linux-androideabi-gdb.exe Add to Debuggers
Confirm the error and then you can build the project.
8. Create a new sample project with the following steps
To add a file or project in the first step file:
Second Click to select:
The third step is to click Next:
After setting up the kits, select the next step directly, and finally select Finish.
9. Replace the main.cpp code to show Hello Qt
10. Click build directly to see if the normal compilation, if the error here, you can leave a message, try to solve for everyone. Everything is normal. Click Run, this process is slow, will be compiled into an APK file and deployed to the emulator.
Some settings for Android programs can be modified in the project properties
Specific settings can be viewed in the QT help.
11. Start the debugging process, such as:
When you start debugging, you will encounter the following screen:
The interface does not affect debugging, click OK to skip.
Simple debugging methods such as VS and print log
Print the Log method: qt debugging do not use printf when using qwarning ("Cannot find the example directory"); Directly under the console or the log file output (the implementation is included in the main.cpp)
This is the end of the environment!
Other problems encountered:
Solution: A problem with text encoding. Basically you have to open the GB2312, GBK code, you in the settings to change to GB2312, good,
http://blog.csdn.net/liuguangzhou123/article/details/17050251
Windows Qt5.2 for Android development environment setup