When you run the React-native project on an Android phone
Error: Unable to load script from assets ' index.android bundle ', make sure your bundle is packaged correctly or youu ' re runin G A Packager server
Solution:
First step: Create a assets empty folder under the Android/app/src/main directory
Step Two: Execute the following command
- React-native Bundle--platform Android--dev false--entry-file index.android.js--bundle-output android/app/src/main/ Assets/index.android.bundle--assets-dest android/app/src/main/res/
Will find two more files under the Assets folder
Step three: Re-run the program.
Summarize:
This index.android.bundle is undoubtedly the JS script used to invoke the native control, each time you change the Index.android.js, you need to use the code snippet above, to update the index.android.bundle in a timely manner, and then package before you can put the new Index.android.js application, so when there is no Index.android.bundle file, RN is no The method of operation.
see:http://blog.csdn.net/u014175342/article/details/73823904
Unable to load script from assets ' index.android bundle '