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 2033
你的背包
你的背包 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条回答
  •  难免孤独
    2020-11-28 19:52

    By default a tiny JavaScript server called "Metro Server" runs on the port 8081.

    You need to make this port available for this Server to start. So,

    1. release the port
    2. close your virtual device
    3. "react-native run-android" again.

    How to release the port?

    http://tenbull.blogspot.com/2019/05/how-to-kill-process-currently-using.html

    How to kill the process currently using a port on localhost in windows?

    and most importantly, I upgraded my node version from 8.x to 10.x(latest), as suggested by facebook @ https://facebook.github.io/react-native/docs/getting-started

提交回复
热议问题