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

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

"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."

I'm totally confused what I'm doing wrong.


Edit: Adding an error screenshot

enter image description here

Answer

You haven't started the bundler yet. Run npm start or react-native start in the root directory of your project before react-native run-android.

以上是 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 的全部内容, 来源链接: utcz.com/a/24111.html

回到顶部