Qt for Android development environment configuration

Source: Internet
Author: User

Think about it, or write a tutorial on the QT for Android development environment configuration.

Preparation: Java jdk,android sdk,android adb,android ndk,android ant,qt support Android version, such as qt-opensource-windows-x86-android-5.6.2.

Preface: QT version update, QT support more and more features, installation package is also growing, before Qt5.9 out, each version of QT corresponding to the compilation environment, and in Qt5.9 after the QT officially put a lot of compilation environment together, and here I want to say is to configure QT for Android development environment, it should be selected in the installation component about Android.

The following begins with the development environment of QT for Android.

First, install the Java JDK.

If you have previously configured it, you can skip this step.

Download Java JDK 64:java JDK 1.8 x64

Download Java JDK 32:java JDK 1.8 x86

Java JDK 1.8 official website: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

To configure the system environment variables:

Variable name: java_home

Variable value:C:\Program files\java\jdk1.8.0_144

Variable name: CLASSPATH

Variable value:.; %java_home%\lib;%java_home%\lib\tools.jar

Notice there's another one in front of%java_home%\lib;%java_home%\lib\tools.jar . .;

In the PATH variable name, add

Variable value:%java_home%\bin

Configuration diagram:

Second, configure Android SDK, NDK, Ant

The most convenient way to configure the Android SDK is to download an Android studio and then install it, which provides the SDK and ADB.

: Https://dl.google.com/dl/android/studio/install/2.3.3.0/android-studio-bundle-162.4069837-windows.exe

China official website: http://www.android-studio.org/

After installation, run the program, he will unzip the SDK, you can change the SDK version in the settings.

Then open the SDK saved folder, my custom SDK path at the time of installation.

Put the inside of the directory. The \platform-tools is added to the system environment variable .

Android Ant Download official website: http://ant.apache.org/bindownload.cgi

Here I'm using the latest version of the Ant1.10.1:http://apache.fayea.com//ant/binaries/apache-ant-1.10.1-bin.zip.

Then unzip it out and will . The \apache-ant-1.10.1\bin is added to the system environment variable .

Configuration diagram:

Android NDK The latest version of no use, you can try, I used here ndk_r9d: Http://dl.google.com/Android/ndk/android-ndk-r9d-windows-x86.zip

Unzip the downloaded NDK and open the QT Creator.

Third, open the tool → option →android. If you can't find it, search at 1

Click Browse to select the respective directory, then tap apply, then go to build and run , which you can see detected in the widget suite.

After that, click OK, and then select the build kit you want when you create a new project, which is handy when I select it all.

What I want to say here is that I use the real machine test, the so-called real machine test is to use your own phone or tablet test.

When selected, click Confirm (OK) to write the QT program on your phone. Mobile phone side need to note is: turn on USB debugging, if there are allow USB installer, please confirm the installation. Xiaomi phone need to open USB installation

Well, Qt for Android environment with this, if in doubt please leave a message or e-mail: [email protected]. If this article has been approved by you, then please give the top.

Qt for Android development environment configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.