bug : Xcode中运行React Native应用程序, AppDelegate.m文件中报错 “RCTBundleURLProvider.h” file not found
![](https://img.haomeiwen.com/i126164/30236813fe145325.jpg)
解决:
- 删除React Native应用程序根目录下
node modules
文件
![](https://img.haomeiwen.com/i126164/6b09966b1bf11756.png)
- 然后运行
npm install
(或者使用yarn
)重新下载, - 在完成所有内容下载后,运行
react-native upgrade
,它可以让你选择用模板替换旧文件,这样做你可以在react-native中重新链接你的本机依赖,最后不要忘记在Xcode中清理你的项目。
网友评论