React Native builds Android development environment

Build Android development environment

My computer is a windows system, so I can only build Android. If the computer is a mac, I can build both Android and ios.

Development documentation for the official website to build the environment https://www.reactnative.cn/docs/0.63/environment-setup

1. Download JDK

Please note this, the JDK version is version 1.8

Download JDK address

You need to register an Oracle account,
Insert image description here
set your own directory and continue to the next step until the installation is successful.

2. Install Android Studio

Official website download address

Keep selecting next in the previous step until you select custom installation in the next step.
Insert image description here
Configure the file directory and select all.
Insert image description here
Accept all. It may take a long time.
Insert image description here

2.1 Configure ANDROID_HOME environment variable

Install the SDK in your new project
Insert image description here
to configure the sdk
Insert image description here
Insert image description here

3. Initialization project

The react-native version of the initialization project
must be 0.68.2

 npx react-native init chapter2 --version 0.68.2

Insert image description here

Enter the project
Insert image description here
to run the project

 yarn android

Insert image description here
Insert image description here

Guess you like

Origin blog.csdn.net/2201_75499330/article/details/133312948