1. Start running
1) Use the command to enter the new file directory, such as HelloWorld, and then enter react-native start:
After waiting for some time, we see an address on the last side, indicating that it has been successfully run.
We enter the address http://localhost:8081/index.android.bundle?platform=android, you can see a lot of JS:
To this, we run successfully.
2. Running the Android platform
1) We go to the directory where you want to run the program, enter the command react-native run-android
Above we are waiting to download
If the above success, the following will not have to look, directly see the 3rd .
2) I run an error, as follows:
The main reason for this is that there is no installation version 23.0.1. Below we install:
Open ' Android Studio ' and select Tools->andorid->sdk Manager. You can see a link Launch Standalone SDK Manager below. Then select the downloaded version
3) If the download has been stuck, please continue to enter the command react-native run-android to run the download.
4) If the following error occurs, it proves that the emulator is not running
The following describes how to run the emulator.
Open ' Android Studio ', create a new project, then click on the Run button above to run the emulator. After successful operation, enter the above command.
The emulator starts running:
Here we see the command build successful proves the success of the run
3. Successful operation
After we have successfully run the project, we can see that the program is already running on the emulator.
React native02-start running Android