Android React Native Development environment built---windows

Source: Internet
Author: User
Tags blank page

Environment construction

Environmental construction can refer to the RN official website, also can refer to the Chinese version: http://reactnative.cn/docs/0.45/getting-started.html

If you want to see the original installation process, you can look at the official address, this article is only my personal practice, and is limited to the window platform.

Official address: https://facebook.github.io/react-native/docs/getting-started.html

1. Download chocolatey

To the official website to download, generally no problem.

2.node,python2,jdk8

Choco Install Nodejs. Install

Choco Install Python2

Choco Install Jdk8

If you already have Jdk7 installed, or you already have an Android development environment.

But, you still have to follow the above command to install JDK8. I can't confirm if Jdk7 can replace Jdk8, but the official request Jdk8, so do it.

3.The React Native CLI

NPM install- g react-native-cli

4.android Development Environment

As an Android developer, these environments themselves have already been installed, just pay attention to the need for more than 23 SDK.

5.Android_home

Set the path of the SDK address bin to Android-home

Now that the basic environment is OK, we start the first project

6.A New Project

React-native init awesomeproject

7. Debugging with a real machine

Simulators can also be debugged, specific crossing nets, as Android developers, should have a lot of phones, so the real machine is the first choice. USB drive, etc., has been done.

8.run android react native

CD Awesomeproject

React-native Run-android

9. Safe filtering

According to the process of the official website, everythingisok,but, you see a blank page, or a red warning page.

This time shake a mobile phone, devsetting.

The first thing to understand here is that RN, which is simply the H5 run, H5 needs to be deployed to the server

To run, so, without deploying the server, it will be reported red.

devsetting, locate debug server host or Port ... , enter the local address: 8081, you can see the following screen:

Done!

Android React Native Development environment built---windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.