先执行
react-native start
出现错误
Unable to resolve module `@babel/runtime/helpers/interopRequireDefault`
执行
npm i @babel/runtime
再次运行react-native start,成功
访问http://localhost:8081/index.bundle?platform=android得到一个js文件。说明运行成功,接下来连接到手机。
手机用USB线连接到笔记本
执行
react-native run-android