Unable to load script from assets 'index. android. bundle' solution in react native,
A friend just asked me to create a project and reported the following error: Unable to load script from assets 'index. android. bundle '. This problem has not occurred before, so I found a solution and shared it.
The solution to this problem is:
Enter the mian file under the src file under the app directory under the android directory under the root directory of your project (which may be a bit of a wrap), under the main folder, create an assets file, which is the resource folder of rn!
Then, use dos to enter the root directory of your project and 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
After the command is successfully executed, the following result is returned:
Okay, then you can run your command, react-native run-android
Now the above problem has been solved, but the new problem has appeared again, and the log console has not been popped up, so we will find the answer to this question. If you encounter the same problem, if you have found the answer, please share it!