Unable to load script.Make sure you are either running a Metro server or that your bundle 'index.android.bundle' is packaged correctly for release

后端 未结 30 2032
你的背包
你的背包 2020-11-28 19:16

react-native run-android command terminates by leaving a message in android simulator. The message is as follows:

Unable to load script.Make

30条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-28 19:39

    IMPORTANT - You might have many Virtual devices in your environment. Ensure if you are changing AVD you repeat the setting again.

    DEBUG INFORMATION-

    Incase you are experiencing above error you have to 1st verify what is running on port 8081

    Quickest way to find that is using the following command in terminal

    netstat -aon | findstr 8081
    

    if that shows you something it means the port is blocked. if possible get that port unblocked.

    Otherwise, you would need to change the port. The process to do that has already been mentioned in the comment above by Naveen Kumar

    react-native run-android --port=9001
    

    Ensure 9001 is not used either :)

提交回复
热议问题