Android from scratch to develop a learning process React Native - RN good entry DEMO- (a) Software Installation and environmental structures



Earlier this year the company into new projects use React Native App development carried out my first reaction was anyway, but not as good as new technology never learned to customer requirements with React Native is no way to use now Google own son only learned Flutter

Here then began to enter the topic

Environment configuration is not that hard you shining like tutorial configuration
React Native Chinese network

The first is the choice of development environment I chose the "complete native environment,"
here is my Win10 system so chose windows
Here Insert Picture Description
so you can see here we need to install the following:
the Node, Python 2, the JDK and Android Studio


A. First Node

React Native ask our nodejs version must be greater than or equal to 10
recommended direct download the latest version from the Chinese network:
Node.js Chinese Network: http: //nodejs.cn/

Installation and configuration can read my other article:
Node.js installation and configuration environment


II. Then the installation is Python2.x

React Native ask our version of Python must 2.x (not supported 3.x)
Download the latest version from the official website:
Python official website

Installation and configuration can read my other article:
Python2.x installation and configuration environment variable


III. Followed by the installation of jdk

React Native ask our JDK version 1.8 must be
said here If you are installing version 3.5 after Androidstudio now comes jdk1.8 direct
path \ jre can be used directly in the installation path
such as D: \ androidstudio \ jre

Two days before the company win10 redo the system upgrade me directly replaced by a new Androidstudio3.5.2

Because my article itself is a tutorial React Native Android for developers
so jdk installation will not repeat
all of you to like Baidu

In short, if you are alone on the safe use of jdk jdk environment variable with
variable if you are using jdk under the Androidstudio then use it with the environment


IV. Then install Android Studio

Ibid
because my article itself is a tutorial React Native Android for developers
so installation is not in the repeat


Thus the basic tools we have developed React Native installation


In addition to software Some say we need to set the default configuration:

1.1 After installing Node recommends setting npm mirror (Taobao source) to accelerate the process behind (or scientific use Internet tools).

Note: Do not use cnpm! cnpm installed modules rather strange path, packager does not recognize normal!

# 使用nrm工具切换淘宝源
npx nrm use taobao

# 如果之后需要切换回官方源可使用 
npx nrm use npm

1.2, can also be used Yarn (recommended)

Yarn is an alternative npm tools provided by Facebook, you can speed up the download node module


npm install -g yarn

After installing npm yarn can be used instead of yarn, for example, instead of using yarn npm install command, instead of npm install a third-party library name with yarn add a third-party library name


2.1. After installing Androidstudio addition to the basic environment variables that we need additional configuration ANDROID_HOME environment variables

Our path is the directory where the Android SDK
I have here is [D: \ androidSDK \ Sdk]
Here Insert Picture Description

2.2, we need to [Path] after adding platform-tools directory path where the Android SDK

I was here [D: \ androidSDK \ Sdk \ platform -tools ]
Here Insert Picture Description

To be continued

Released four original articles · won praise 6 · views 3410

Guess you like

Origin blog.csdn.net/zafkiel_/article/details/104069500