React native Unable to load script from assets ' index.android.bundle ' solution

Source: Internet
Author: User


Just a friend asked me, said is to create a project, after running an error: Unable to load script from assets ' Index.android.bundle ', before good did not appear this phenomenon, so I found a solution, share.

The solution to this problem is:
Enter the Mian file under the app directory under the Android directory under the root directory of your project, (which may say a bit around), under the main folder, create a assets file, this file is RN's Resource folder!
Then use DOS to enter your project root directory and execute the command:
false --entry-file index.android.js--bundle-output android/app/src/main/assets/index.android.bundle-- Assets-dest Android/app/src/main/res

When the command executes successfully, it returns as follows:

Well, then you can run your order now, react-native run-android

Now the above problem is solved, but the new problem appears again, the log console does not bounce out, so the next will find the answer to this question, if you encounter the same problem, if you have found the answer, welcome to share!

React native Unable to load script from assets ' index.android.bundle ' solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.