Installation and Configuration react native

Download and install the Node, Python2 and Java SE Development Kit (JDK)

Note Node version must be higher than 8.3, Python must be version 2.x (not supported 3.x), and must JDK version 1.8 (currently does not support 1.9 and later).
These are the official website, the installation process can Baidu, remember to configure, I mainly planted in the Android studio, so I say this in detail

The first step must be to download and install it, are two links, after all, we could not touch the official website ~ ~

The first is the official website of AS Chinese community: http://www.android-studio.org/
second is AndroidDevTools: http://www.androiddevtools.cn/index.html
installation is fool, all the way to point the way to the point, you You can also modify the installation path, be happy

Configuration

Open the Control Panel -> System and Security -> System -> Advanced System Settings -> Advanced -> Environment Variables -> New to create an environment variable named ANDROID_HOME the (system or user variables are available), point your Android SDK is located directory (specifically, FIG path may lower and it is not, should confirm):
Here Insert Picture Description
configuration pATH adb services to be performed
Here Insert Picture Description

Create a project

react-native init AwesomeProject

Compile and run React Native Application

Into the project: cd AwesomeProject
compiling:react-native run-android

Error 1:

Here Insert Picture Description

Solution:
Here Insert Picture Description
Select "SDK Platforms" in the SDK Manager tab, then check "Show Package Details" in the lower right corner. Expand the Android 8.1 (Oreo) Options

  • Android SDK Platform 27
  • Intel x86 Atom_64 System Image

Then click "SDK Tools" tab, the same hook in the bottom right corner of the "Show Package Details". Expand the "Android SDK Build-Tools" option, make sure the version React Native necessary 27.0.3. You can install multiple other versions at the same time.

Finally, click "Apply" to download and install these components.

Error 1:The resource ':\\workspace\\AwesomeProject\\index.android.js' was not found.

Deleted project, create a new project
REACT-Native AwesomeProject the init
cd AwesomeProject
REACT-RUN-Native Android

This problem is actually looking for a long time, I made reference to the https://blog.csdn.net/mymy_blog/article/details/73277884 him, but my first attempt, in fact, no effect, after I took over the wall tool, created with Android studio project, the creation process to download a lot of content, I guess it may be because this

Guess you like

Origin blog.csdn.net/liuy_1314/article/details/84570877