Android development environment configuration Qt5.13.2

Android development environment configuration Qt5.13.2

  • JDK installation configuration
  • Download JDK

Downloaded from the official website oracle java installation package:

https://www.oracle.com/java/technologies/javase-downloads.html

  • Install the JDK

First, double-click the downloaded installation package (jdk-8u241-windows-x64.exe) Click Install, click Change, select your installation path, and then wait for the installation to complete the next step.

  • Configuring JDK environment variables

The next step is to configure the JDK environment variable, right this computer -> Properties -> Advanced System Settings -> Environment Variables -> New

https://img-blog.csdnimg.cn/20190801162229682.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3Ryb3VibGVjb2Rlcg==,size_16,color_FFFFFF,t_70

Variable names are: JAVA_HOME

Variable value is: You just JDK installation path

Click OK again to New

Variable name: CLASSPATH

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

Click OK after the system variables in the Path add the path again, select the JDK installation directory in the bin, for example, mine is D: \ QtForAndriod_Enviroment \ JDK_Installed \ Java \ jdk1.8.0_172 \ bin

https://img-blog.csdnimg.cn/20190801162926141.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3Ryb3VibGVjb2Rlcg==,size_16,color_FFFFFF,t_70

Then enter cmd in the Open success JAVA -version if the following occurs as evidenced environment configuration

https://img-blog.csdnimg.cn/20190801163241810.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3Ryb3VibGVjb2Rlcg==,size_16,color_FFFFFF,t_70

 

  • SDK installation configuration
  • Installing the SDK

Download installer_r24.4.1-windows.exe from https://www.androiddevtools.cn/.

  • Download the SDK library

Find just downloaded installer_r24.4.1-windows.exe double-click the installation path of their choice, run after the installation is complete.

Domestic software source added: Tools -> option, enter the following two columns in the following URL: mirrors.neusoft.edu.cn Port: 80, click on the close (if not scientific Internet, follow http://tools.android -studio.org/index.php/proxy reconfigure the software source), and then click Package -> Reload will be updated build of Android tool.

https://img-blog.csdnimg.cn/20190801163708877.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3Ryb3VibGVjb2Rlcg==,size_16,color_FFFFFF,t_70

To avoid unexpected problems, it is recommended Extras Tools and fully armored, various versions of the SDK are also installed:

  • Configure SDK

2, increase environmental variables

Increasing a ANDROID_SDK_HOME variables in the system variables, Android SDK installation directory attribute value

In the path variable and then add the following path:

%ANDROID_SDK _HOME%\tools;

%ANDROID_SDK _HOME%\platform-tools; 

  • NDK installation configuration
  • Download NDK

From https://developer.android.google.cn/ndk/downloads/ download NDK stable version of android-ndk-r20b (the latest version will go wrong at compile time).

  • NDK installation

NDK unzip the downloaded file to the path they want to.

  • Installation and configuration of Qt

Install Qt, check the options related to Android development.

Open Qtcreator, click on the tool options, JDK himself detected, simply SDK and NDK path added to it, then the SDK manager will show you download the SDK tool, click OK, and environment on the basic configuration is complete.

 

  • Build and run the project

Follow these steps in order to create a new project:

Select arm64-v8a compiler begins compiling

Midway will select the device best to use a computer to connect mobile phones, based on experience, unexpected problems occur with the simulator and run the simulator, the phone will not necessarily wrong.

If similar to the following errors that occur during building, because the download is interrupted, after each failed run again by clicking on it until there are no errors.

  • Android devices do not solve the pop-up reminder debugging authorization

Installation Android SDK, set system environment variables% ANDRIOD_SDK_HOME%, after setting check:

C:\Users\leizm>echo %ANDRIOD_SDK_HOME%

G:\adt-bundle-windows-x86-20131030\sdk\platform-tools

Install the phone drivers

Install adb, many tools are installed automatically, you can view the command:

C:\Users\leizm>where adbC:\Android\adb.exe

C:\Users\leizm>adb devices

List of devices

attached84a82bcc unauthorizedunauthorized indicate unauthorized debugging.

Enter the command processing

C:\Users\leizm>adb kill-server

C:\Users\leizm>adb start-server

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

C:\Users\leizm>adb devices

List of devices

attached84a82bcc        device

 

Published an original article · won praise 0 · Views 13

Guess you like

Origin blog.csdn.net/weixin_43824677/article/details/105289693