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

1: Open mobile developer mode , open USB debugging

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




Reprint : about Qt for Android Tutorials for developing environment configuration .

get ready :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 : stay Qt Version update of ,Qt More and more functions supported , Installation packages are getting bigger and bigger , stay Qt5.9 Before you come out ,Qt The compiler environment for each version of , And in Qt5.9 after Qt The government put a lot of compiling environments together , And here I'm talking about configuration Qt
For Android Development environment of , Then you should select the relevant Android This one .

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

One , install java jdk.

If configured before , You can skip this step .

download java jdk 64:java jdk 1.8
<http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-windows-x64.exe?AuthParam=1501946778_e49e7393b43625ea18e0d6651455c492>
 x64

download java jdk 32:java jdk 1.8
<http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-windows-i586.exe?AuthParam=1501946870_2ccf9af9532d38a28b8b228400a01c3b>
 x86

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

<http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html>

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 .;

stay Path Add to variable name

Variable value :%JAVA_HOME%\bin

Configuration diagram :







Two , to configure Android sdk ,ndk,ant

Android sdk The most convenient way to configure is to download one Android studio, Then install , It provides sdk and adb.

Download address :
https://dl.google.com/dl/android/studio/install/2.3.3.0/android-studio-bundle-162.4069837-windows.exe

<https://dl.google.com/dl/android/studio/install/2.3.3.0/android-studio-bundle-162.4069837-windows.exe>

Official website of China :http://www.android-studio.org/ <http://www.android-studio.org/>

After installation , Run program , He'll unzip it sdk, Can be changed in settings SDK edition .

Another way is to download directly SDK install :installer_r24.4.1-windows.exe
<https://dl.google.com/android/installer_r24.4.1-windows.exe>, Run the “SDK
Manager.exe”, Then check install , Required in the first two boxes , After Build-tools It is better to choose the corresponding version . For Android version, what I install here is Android 6.0
(API 23), You can choose .





After installation , find SDK 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 :http://ant.apache.org/bindownload.cgi
<http://ant.apache.org/bindownload.cgi>

What I'm using here is for now the latest version ant1.10.1:
http://apache.fayea.com//ant/binaries/apache-ant-1.10.1-bin.zip
<http://apache.fayea.com//ant/binaries/apache-ant-1.10.1-bin.zip>

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

Configuration diagram :



Android NDK The latest version is useless , You can try , I used it here ndk_r9d:
http://dl.google.com/Android/ndk/android-ndk-r9d-windows-x86.zip
<http://dl.google.com/Android/ndk/android-ndk-r9d-windows-x86.zip>

Some people say r9d Some problems , succeed in inviting sb. NDK Official download link collection <http://www.cnblogs.com/CLXiao-1029/p/7368071.html>
Download the latest version .
<http://www.cnblogs.com/CLXiao-1029/p/7368071.html>

Here I post one ndk_r11c:
http://dl.google.com/android/repository/android-ndk-r11c-windows-x86.zip
<http://dl.google.com/android/repository/android-ndk-r11c-windows-x86.zip>

 

Unzip and download OK ndk, Then open Qt Creator.



Three , Open tools → option →Android. If not found , Winning the bid on the map 1 Search at



Click Browse to select the corresponding directory , Then click Apply (Apply), Then go 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 phone Qt program . Note that : open USB debugging , If allowed usb erection sequence , Please confirm the installation . Xiaomi mobile phone needs to be turned on USB install