Complete the configuration as follows, Mobile phone connected to computer, Still can't be inQt Creator Build and install Android Application on, Try to solve:

1: Open mobile developer mode, openUSB debugging

2:cmd: adb devices   Check if the phone is connected properly.( If not authorized unauthorized, Manually reopenUSB debugging, Try more)

Reprint: aboutQt for Android Tutorials for developing environment configuration.

Get ready:Java jdk,Android sdk,Android adb,Android ndk,Android ant,Qt Support
Android version, such asqt-opensource-windows-x86-android-5.6.2.

Preface: stayQt Version update of,Qt More and more functions supported, Installation packages are getting bigger and bigger, stayQt5.9 Before coming out,Qt The compiler environment for each version of, While inQt5.9 afterQt The government put a lot of compiling environments together, And here I'm talking about configurationQt
For Android Development environment of, Then you should select the relevantAndroid This item.

Let's start the formal matchQt for Android Development environment of.

One, installjava jdk.

If configured before, You can skip this step.

downloadjava jdk 64:java jdk 1.8

downloadjava jdk 32:java jdk 1.8

Java jdk 1.8 Official website:


Configure 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

Be careful%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar There's another one in front.;

stayPath Add to variable name

Variable value:%JAVA_HOME%\bin

Configuration Icon:

Two, To configureAndroid sdk ,ndk,ant

Android sdk The most convenient way to configure is to download oneAndroid studio, Then install, It providessdk andadb.

Download address:


China official website: <>

After installation, Operation procedure, He'll unzip itsdk, Can be changed in settingsSDK Edition.

Another way is to download directlySDK install:installer_r24.4.1-windows.exe
<>, Run the“SDK
Manager.exe”, Then check install, Required in the first two boxes, SubsequentBuild-tools It is better to choose the corresponding version. For Android version, what I install here isAndroid 6.0
(API 23), You can choose.

After installation, findSDK Under the installation directory “platform-tools” Catalog, Put the path of this directory“..\platform-tools” Add to system environment variable.

Android ant Download official website:

What I'm using here is for now The latest version ant1.10.1:

And extract it, take..\apache-ant-1.10.1\bin Add to system environment variable.

Configuration Icon:

Android NDK The latest version is useless, You can try, I used it herendk_r9d:

Some people sayr9d Some problems, succeed in inviting sb.NDK Official download link collection <>
Download the latest version.

Here I post onendk_r11c:


Unzip and download OKndk, Then openQt Creator.

Three, Open tools→ option→Android. If not found, Winning the bid on the map1 Location search

Click Browse to select the corresponding directory, Then click Apply(Apply), Then turn to“ Build and run”, You can see it has been detected in the component suite.

after, Click OK(OK), Then select the build suite you need when you create a new project, It's convenient for me to select all of them.

Ad locum, What I want to say is, My real machine test, The so-called real machine test is to use your own mobile phone or tablet test.

Click OK after selection(OK), You can write it on your cell phoneQt program. Note that: openUSB debugging, If allowedusb Erection sequence, Please confirm the installation. Xiaomi mobile phone needs to be turned onUSB install