Unable to load script.Make sure you’are either running a Metro server(run ‘react-native start’)….

react-native报错:Unable to load script.Make sure you’are either running a Metro server(run ‘react-native start’)….

Unable to load script.Make sure you’are either running a Metro server(run ‘react-native start’)…._第1张图片

可能的原因

直接在项目下运行:
react-native run-android

解决办法

1.执行

$ react-native start
$ react-native run-android

Unable to load script.Make sure you’are either running a Metro server(run ‘react-native start’)…._第2张图片

2. 再次执行

react-native run-android

Unable to load script.Make sure you’are either running a Metro server(run ‘react-native start’)…._第3张图片

loading 30s ..... 

你可能感兴趣的:(React,Native开发,大前端开发,react,native)