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 2030
你的背包
你的背包 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:34

    if you have everything correctly configured then try this:

    adb reverse tcp:8081 tcp:8081

    Why? "When the RN packager is running, there is an active web server accessible in your browser at 127.0.0.1:8081. It's from this server that the JS bundle for your application is served and refreshed as you make changes. Without the reverse proxy, your phone wouldn't be able to connect to that address."

    all credits to Swingline0

提交回复
热议问题