Windows Build installation react-native environment

Source: Internet
Author: User



In the WIN10 environment, the Genymotion simulator is used to configure the react-native environment.


First, install the JDK


To download the JDK online, the best version is more than 1.8. Configure the environment variables after installation.






Also configure the JDK environment variables in Path :








Description

After installation, you can pass

Java –version

To view the version of the currently installed JDK.




Second, install the SDK


This is the version of Android Studio that I downloaded in :






Install after download.



Then set the environment variable android_home . For the SDK path we just installed:








Third, set up the SDK


In our second installed file we will see a file:






Click SDK Manager.exe. the corresponding dialog box pops up:






Options for tool Installation:






Install in android6.0 (API23):






To install in Extras:






There is also a file, named this:


 for Support Libraries

Description

Some words will be loaded, my here shows no. So I don't know if it's installed.


Then in the Configure environment variable:








Iv. Installation of Node


: https://nodejs.org/en/



Download node. js, find the corresponding version, and then go to install it. The NODE-V command can be used to test whether the Nodejs is successfully installed





Installing node is the NPM command that uses node, but in the domestic general NPM download slow, you can use CPM. The process can be checked online.




Five, install Git


Git is required to install react-native, if Git is not configured, you need to download the corresponding client and then add git to the PATH environment variable
: https://git-for-windows.github.io/



Specific installation procedures, you can go to find information on the Internet.





Vi. Installing the react-native command-line tool REACT-NATIVE-CLI
NPM install-g REACT-NATIVE-CLI




Vii. creation of the RN project


Create your own React-native project, with the name custom definition.


React-native Init Firstapp


Directory after success:








Eight, install simulator genymotion


Hack version of the online search, with a mobile phone model block.






Installation steps:






Then install the image file phone model block:





Description

The installation model block must be installed through the VirtualBox Manager installed earlier.





After selecting it in the module file, click Next.






then click Install.





Nine, run simulator genymotion


After running the emulator, enter the following in the terminal:


ADB devices





This appears, indicating that the emulator link was successful.


Description

If the adb command cannot be found or has no devices command, the platform-tools environment variable configuration under the Android SDK is not in the correct path. To check under.


Then set the path to the emulator Android SDK :








X. Running the React-native project


First, the project was created by using the react-native init command before entering through the terminal. To execute the West command:


React-native run-android


It is then automatically compiled and compressed into the emulator:





Description

No accident is able to start up. can also be debugged.


Windows Build installation react-native environment


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.