After five days of initial contact with qt, I finally set up the environment and ran normally on the mobile phone.
Linux systems, such as Fedora, Ubuntu, and CentOS. Among them, the new version of Fedora does not work well in the virtual machine environment. the desktop of the newer version of Ubuntu is so cool that it is very slow to use under the virtual machine, therefore, select stable CentOS6.5, although many default software versions in centos are very low, such as the gcc upgrade mentioned later.
Required software:
VMware-workstation-full-7.1.4-385536.zip
CentOS-6.5-i386-bin-DVD1.iso
CentOS-6.5-i386-bin-DVD2.iso
(To upgrade gcc, this step is the most troublesome. It is estimated that the machine configuration is from half an hour to one hour, it took me three hours to compile the gcc source code on the VM. If gcc is not upgraded to 4.8 or above, qtcreator cannot be started)
Isl-0.11.1.tar.bz2 (this is to compile the source code of the gcc dependent library, there are other dependent libraries, the link given below has a detailed introduction)
Gcc-4.8.2.tar.bz2
(Qt for Android environment)
Jdk-7u51-linux-i586.gz
Apache-ant-1.9.3-bin.tar.gz
Android-ndk-r9d-linux-x86.tar.bz2
Adt-bundle-linux-x86-20140321.zip
Qt-opensource-linux-x86-android-5.2.1.run
1. Install VMware7.1.4 and then Centos6.5
After installation, use vm tools to create a shared folder between VM and Centos, so that you can copy files between your win7 and centos.
2. Upgrade gcc to 4.8 or above. Refer to the link:
3. Install qt-opensource-linux-x86-android-5.2.1.run
4. Install jdk and configure jdk Environment Variables
Bytes
6. Configure the corresponding environment variables and the path settings in qtcreator.
Add at the end of the/etc/profile file: (The following path is based on my own)
ANDROID_HOME =/home/android/adt-bundle-linux-x86-20140321/sdk
ANDROID_NDK_ROOT =/home/android/android-ndk-r9d
ANT_HOME =/home/android/apache-ant-1.9.3
JAVA_HOME =/opt/java
JRE_HOME =/opt/java/jre
CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
PATH = $ PATH: $ JAVA_HOME/bin: $ ANDROID_HOME/tools: $ ANDROID_HOME/platform-tools:/home/Qt5.2.1/5.2.1/gcc/bin: /home/Qt5.2.1/Tools/QtCreator/bin: $ ANDROID_NDK_ROOT: $ ANT_HOME/bin: $ ANT_HOME/lib
Export ANDROID_NDK_ROOT
Export ANT_HOME
Export ANDROID_HOME
Export JAVA_HOME
7. Install the mobile phone usb driver in Linux. refer to the following link:
8. Run the sdk manager (/tools/android) on the adt tool and check whether the corresponding sdk-platform of the android version of your mobile phone is properly downloaded and installed.
9. Write the hello program and run it on your mobile phone. OK.
Qt details: click here
Qt: click here
Recommended reading:
Install and configure Gtk and QT compiling environments in Ubuntu
Build a QT environment in Linux
Solution for failure to run the QT console program in Ubuntu and how to configure XTerm
How to port QT4.7.4 in Ubuntu 10.04
Create a desktop startup icon for the installed Qt Creator in Linux
Install QT Creator 2.5.0 on Ubuntu 11.04
Qt creator for PlayBook Installation Process