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
You need to register an Oracle account,
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.
Configure the file directory and select all.
Accept all. It may take a long time.
2.1 Configure ANDROID_HOME environment variable
Install the SDK in your new project
to configure the sdk
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
Enter the project
to run the project
yarn android