Preparing the Development Environment

Setting Up the React Native Development Environment

Set up the React Native development environment. For details, please refer to Setting up the development environment.

说明

The JDK version must be 1.8 or later.

说明

React Native Push Plugin is not supported by Expo CLI. Use React Native CLI instead.

Installing HMS Core (APK)

To use the APIs of Push Kit, you need to download and install HMS Core (APK) 4.0.0 or later on your device.

Installing the Android SDK

Pay special attention to the following:

  • Download Android SDK 10.0 (API level 29) and 9.0 (API level 28):

    Go to Settings > Android SDK > SDK Platforms, select Android 10.0 and Android 9.0, and click OK. Android Studio will automatically download and install Android SDK 10.0 (API level 29) and 9.0 (API level 28).

  • Set the environment variable ANDROID_HOME:

    Open the Control Panel on the Windows, go to System and Security > System > Change settings > Advanced > Environment Variables > New, and create an ANDROID_HOME system or user variable that points to the directory to your Android SDK.

说明
  • By default, the Android SDK is installed in C:\Users\Your_Username\AppData\Local\Android\Sdk.
  • To find where the Android SDK is located, open Android Studio, and go to File > Settings. Then, go to Appearance & Behavior > System Settings > Android SDK, and click Android SDK Location in the pane on the right.
  • Add the platform-tools directory to Path:

    Open the Control Panel on the Windows, go to System and Security > System > Change settings > Advanced > Environment Variables, select the Path variable, and click Edit. Then, click New and add the platform-tools directory to the list.

说明

The platform-tools directory is under the Android SDK directory. After setting the environment variable ANDROID_HOME in the previous step, add %ANDROID_HOME%\platform-tools to the Path variable.

React Native requires Python 2.X, Node, and Android Studio to be installed on your computer.

说明

The JDK version must be 1.8 or later.

Installing Python 2.X

According to the requirements of React Native, Python 2.X must be installed.

For details about the installation and configuration methods, please refer to documents on the official Python website.

Installing Node.js

For details about the installation and configuration methods, please visit the official Node website.

搜索
请输入您想要搜索的关键词