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
<http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-windows-x64.exe?AuthParam=1501946778_e49e7393b43625ea18e0d6651455c492>
 x64

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

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:
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>

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

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
<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, 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: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 Icon:



Android NDK The latest version is useless, You can try, I used it herendk_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 sayr9d 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 onendk_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 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