1. Report error information content
I am running in Android Studio to start the error in the React-Native project Times
2, Chinese translation: cannot load the script. Please make sure you run the Metro server (running-native start ‘) or your software package’ index.android.bundle ‘is packed correctly for release.
2, the reason
Index.android.bundle does this file exist
In the editor, I searched this file and did not find it
3: Solution
Method 1:
1. In the project in Android/APP/SRC/main/Create folder Assets
2, execute commands in the project (the following is a line command, not two lines)
|
*Note: Check if you have the file of index.android.js. If there is an Enter command command, you will report an error, you will not find this index.android.js file; change the index.android.js to change it For index.js
After executing this command, a newETS folder will generate an index.android.bundle file under the new ASSETS folder
3, execute React-Native Run-Android in the project, successfully start
Method 2:
Perform React-Native Run-Android directly in the command line, do not use the RUN of WebStorm
Four, after successful start
Modify the content in the app.js to refresh the simulator to see if the modification is modified; the Android simulator RELOAD menu interface displays the shortcut key CTRL+M;