Meng new with a demo when the react-native android start,
A step of beginning is substantially:
installing node;
JDK installation, configuration java environment variables;
Then download the Android Studio project to get the Android development environment and tools needed;
Command prompt window to install global React Native command-line tool, npm install -g react-native-cli;
With reqct-native init myapp (my project name);
Install lightning simulator (need to change the version of the file);
Under the project root directory, downloading dependencies, react-native run-android running project!
Well, everything is ready! Simulator also display items it!
1. In order to achieve hot update, I point into the project icon, click More on the right, then click Shake:
2. Left-click Settings, down roll, roll ... see Debug server host & port for device yet:
3.! Is Debug server host & port for device, point it in front of the port number 8081, fill your local ip:
PS: how to find ip it:
①window, cmd command window, type: ipconfig, is the following ip4 address
② Click on the lower side of the computer screen has a small computer icon => Open Network and Sharing Center => Open the Local Area Connection => but cut Details => ip4 see it
Well! Then enjoy modifications App.js in it!
Well, with the compiler modify, save and return to the page ........... simulator that good real-time updates of it ??? ................ and no ah!
Ah, then worked for several hours to find a reason ....... Well, actually did not find, is a big ask of God,
4. ah, simulator or shake to go onwards, the Enable Fast Refresh, point it becomes a finished Disable Fast Refresh, really really really hot update is successful it:
5.最后,如果想调试代码的时候能显示console.log的内容,就点击上图的Debugging,当显示Stop Debugging时,默认浏览器就会出来调试页面啦
6.结束!