1. JDK environment configuration
1.1 Download JDK
Official website download jdk
Install jdk-8u341-windows-x64.exe
1.2 Install JDK
Install jdk after downloading
Here you need to remember that the installation directory will be used later, the next step
waiting to download
jdk installed
1.3 Configure JDK, JAVA environment
Right click this computer and open computer properties
Find Advanced System in the menu bar
Open environment variables
Configure JAVA_HOME
as the picture shows
Variable name: JAVA_HOME
Variable value: C:\Program Files\Java\jdk1.8.0_341 (the path where jdk was just downloaded)
Configure CLASSPATH
Variable name: CLASSPATH
Variable value: .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar;
Edit Path
Path exists in the system and does not need to be created, directly select Path to edit, directly select to edit text
Append at the end;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;
After the last change, click OK
Here jdk environment configuration is complete
You can enter cmd with Win+R to open the black box and enter java to see if the configuration is successful
2. Install Android studio
2.1 Install Android studio
Download Android Studio from the official website
After the download is complete, click the exe file to install
click next
Check the Android Virtual Device phone emulator
Reset the installation path (no spaces or Chinese)
There is no need to create a desktop shortcut here, just click next without checking
Complete the installation and start Android studio
Do you need to import the previous configuration settings? By default, you don’t need to (if you have downloaded it before, you can import it)
After the installation is complete, when you start Android studio for the first time, a pop-up box will pop up, prompting us whether to set a proxy, cancel it directly
click next
Standard installs the most common settings and options and is recommended for most users
You can also customize installation settings and components
Recommended black eye protection mode
2.2 Download Android SDK
Check the components to be installed, change the path of the Android SDK
Download components
Download component completed
3. Create a new project
Click new project
Select empty activity
The language can choose JAVA or Kotlin
Fourth, download and create a virtual machine
After entering the welcome interface, click SDK Manager in more actions
In SDK Tools, select the necessary components to install: Android emulator, SDK Platform Tools and virtual machine acceleration, and click Install after selection
The first time you run an Android program, you need to create an emulator first
Click on Device Manager
Click create device
Choose any Android device
I chose pixel3 here
Click Download to download the image file
The virtual machine is created
Run the program, the hello world interface appears, indicating that the environment is successfully built