React-Native搭建报错Unable to load script等,持续更新

1、Unable to load script

React-Native搭建报错Unable to load script等,持续更新_第1张图片

报错信息

Unable to load script.Make sure you're either running a metro server(run 'react-native start' ) or that your bundle 'index.android.bundle' is packaged correctly for release.

报错原因

没有找到index.android.bundle。

解决方案

先执行命令npm install,然后
修改 项目目录/android/app/build.gradle里的配置,
设置bundleInDebug等于true,开发的时候也会打包index.android.bundle
React-Native搭建报错Unable to load script等,持续更新_第2张图片

2、react-native start 报错Invalid regular expression

待解决

你可能感兴趣的:(React,Native,react-native)